IT lexicon › Hardware › Memory-to-memory DMA

Memory-to-memory DMA

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

A DMA mode in which the controller copies between two memory regions with no peripheral involved — essentially memcpy in hardware.

Ordinary DMA waits for a peripheral to request the next word. In memory-to-memory mode there's no such handshake, so the controller runs as fast as the bus allows until the counter hits zero. It's used for moving large blocks: copying a frame buffer to display memory, shuffling audio samples or filling a region with a constant. Not every channel can do it — on the STM32F4 only DMA2 can.

It isn't free. Setting up a transfer costs a handful of register writes, and for a few dozen bytes the CPU could have finished the copy in that time. The payoff comes when the copy is large and the CPU has something better to do meanwhile. On cores with a data cache, the cache also has to be cleaned and invalidated around the transfer, or one side ends up reading stale data.

← Back to the lexicon