Learning path

Full curriculum

Full curriculum

Arrows go from each prerequisite to the units that depend on it. Hover or focus a unit to highlight its path.

Unit content

Direct memory access

Moving a large stream of data one word at a time through CPU instructions can waste processor time. Direct memory access (DMA) lets a hardware engine transfer data between a peripheral and memory, or between memory regions, after software configures the transfer.

A DMA setup typically specifies source and destination addresses, transfer length and details such as element width or whether addresses advance after each item.

While the transfer proceeds, the CPU can execute other work. Software later observes completion by polling status or receiving an interrupt.

DMA does not make synchronization disappear. Software must know when a buffer is safe for the CPU to read or modify and when the peripheral or DMA engine owns it.

Some systems support repeated or circular transfers, which are useful for continuous streams such as sampled sensor data or serial reception.

DMA is therefore a hardware mechanism for decoupling bulk data movement from instruction-by-instruction CPU copying.