<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>SPI in Real Systems on Embedded Systems Development</title><link>https://applied-ee.github.io/embedded/docs/digital-interfaces/spi/</link><description>Recent content in SPI in Real Systems on Embedded Systems Development</description><generator>Hugo</generator><language>en-us</language><atom:link href="https://applied-ee.github.io/embedded/docs/digital-interfaces/spi/index.xml" rel="self" type="application/rss+xml"/><item><title>SPI Mode Configuration &amp; Clock Polarity</title><link>https://applied-ee.github.io/embedded/docs/digital-interfaces/spi/spi-mode-configuration/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/embedded/docs/digital-interfaces/spi/spi-mode-configuration/</guid><description>&lt;h1 id="spi-mode-configuration--clock-polarity"&gt;SPI Mode Configuration &amp;amp; Clock Polarity&lt;a class="anchor" href="#spi-mode-configuration--clock-polarity"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;SPI communication hinges on two clock parameters — polarity and phase — that together define four operating modes. Every SPI device datasheet specifies which mode the device expects, and a mismatch by even one bit produces garbled data or complete silence. The mode must be set before the first clock edge leaves the master, and once a transfer is in progress, the mode cannot change until the bus returns to idle.&lt;/p&gt;</description></item><item><title>Chip-Select Management</title><link>https://applied-ee.github.io/embedded/docs/digital-interfaces/spi/spi-chip-select/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/embedded/docs/digital-interfaces/spi/spi-chip-select/</guid><description>&lt;h1 id="chip-select-management"&gt;Chip-Select Management&lt;a class="anchor" href="#chip-select-management"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;The chip-select (CS) line determines which device on a shared SPI bus is active for a given transaction. CS is active-low by convention — asserting CS means driving the pin low, and deasserting means driving it high. Getting CS timing right is the difference between clean SPI communication and intermittent data corruption that only appears under load or at higher clock speeds. Most SPI bugs that appear random are actually CS timing issues.&lt;/p&gt;</description></item><item><title>DMA-Driven SPI Transfers</title><link>https://applied-ee.github.io/embedded/docs/digital-interfaces/spi/spi-dma-transfers/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/embedded/docs/digital-interfaces/spi/spi-dma-transfers/</guid><description>&lt;h1 id="dma-driven-spi-transfers"&gt;DMA-Driven SPI Transfers&lt;a class="anchor" href="#dma-driven-spi-transfers"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;Polled and interrupt-driven SPI transfers consume CPU cycles for every byte moved. For bulk operations — reading a 4 KB page from flash, streaming pixel data to a display, or capturing 1000 samples from an ADC — DMA (Direct Memory Access) offloads the byte-shuffling to dedicated hardware, freeing the CPU to run application code or sleep. On STM32F4, a DMA-driven SPI transfer at 10.5 MHz can move 4096 bytes in approximately 3.1 ms with near-zero CPU involvement after the initial setup.&lt;/p&gt;</description></item><item><title>Multi-Device SPI Buses</title><link>https://applied-ee.github.io/embedded/docs/digital-interfaces/spi/spi-multi-device/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://applied-ee.github.io/embedded/docs/digital-interfaces/spi/spi-multi-device/</guid><description>&lt;h1 id="multi-device-spi-buses"&gt;Multi-Device SPI Buses&lt;a class="anchor" href="#multi-device-spi-buses"&gt;#&lt;/a&gt;&lt;/h1&gt;
&lt;p&gt;A single SPI peripheral can communicate with multiple devices by sharing MOSI, MISO, and SCK while providing a dedicated CS line for each device. This saves peripheral count and GPIO pins, but introduces constraints: devices with different speed requirements, different SPI modes, or conflicting MISO drive behavior must all coexist on the same three wires. Knowing when shared-bus topology works — and when separate SPI peripherals are the safer choice — prevents subtle bugs that only appear when two devices interact.&lt;/p&gt;</description></item></channel></rss>