IT lexicon › Hardware › Circular DMA

Circular DMA

Hardware På svenska → Updated: 2026-11-03

A DMA mode where the transfer wraps back to the start of the buffer by itself, so the hardware fills a ring buffer forever without the CPU touching it.

An ordinary DMA transfer finishes and has to be re-armed. In circular mode the channel reloads its address and count automatically, so the stream never stops. That suits an ADC sampling continuously or a UART receiving data at an unpredictable rate. Most microcontrollers raise two interrupts per lap, one at the halfway mark and one at the end. The CPU processes one half while DMA writes into the other, which is double buffering in a single array.

The channel's down-counter doubles as the write pointer of a ring buffer, so firmware can check at any moment how far the hardware has got. The catch is that each half has to be dealt with before the next half-lap. Miss it and the data is silently overwritten: no error, no interrupt, just odd numbers.

← Back to the lexicon