In this lesson, you will learn how to use burst transfer modes to slash bus overhead and maximize your DMA’s data throughput.
The Cost of Arbitration
Up until now, you’ve likely configured the DMA to transfer data one word at a time. In a single-beat transfer, the DMA controller requests the system bus, moves one piece of data, and then releases the bus. If the bus matrix is busy, or if your peripheral is high-speed, this constant "request-release" cycle creates significant latency. Every time the DMA asks for the bus, it pays an arbitration penalty—a waiting period where no actual data is moving.
The Power of Burst Transfers
Burst mode allows the DMA to "seize" the bus for a continuous block of transfers. Instead of requesting the bus for every single byte or word, the DMA controller negotiates access once and then moves a predefined number of beats (a "burst") back-to-back.
By moving data in a contiguous stream, you eliminate the repetitive arbitration cycles. This significantly reduces the total time the DMA spends waiting for the bus, leaving more bandwidth available for the CPU or other bus masters.
Configuring Burst Settings
Burst configurations are typically set in the DMA channel control register. You must define both the burst size (number of beats, e.g., 4, 8, or 16) and the data width (e.g., 32-bit).
// Conceptual configuration for a 4-beat burst
DMA_Channel->CCR |= (0x02 << DMA_BURST_SIZE_POS); // Set burst to 4 beats
DMA_Channel->CCR |= (0x02 << DMA_WIDTH_POS); // 32-bit word alignment
Crucial Note: For burst transfers to work correctly, your source and destination addresses must be aligned to the burst size. If you attempt a 4-word burst starting at an unaligned memory address, the hardware will either force a single-beat transfer or trigger a bus error. Always ensure your buffers are aligned in memory to match your chosen burst length.
Key Takeaway: Burst transfer modes maximize throughput by amortizing the cost of bus arbitration over multiple data beats, allowing the DMA to sustain higher speeds with less overhead.