Skip to content
RED SAGSkills
mediumEmbedded Systems Engineer interview question

What is DMA, when would you use it, and what pitfalls do you watch for?

What the interviewer wants to hear

  • DMA moves data between peripherals and memory without the CPU
  • Good for ADC streams, UART/SPI bulk transfers and audio
  • Circular and double-buffer (half/full transfer) modes
  • Cache coherency on cores with data cache
  • Buffer lifetime, alignment and memory regions DMA can reach

Model answer

DMA is a hardware engine that copies data between peripherals and memory, or memory to memory, without the CPU moving each byte. I use it for continuous or bulk data, such as ADC sampling at high rates, receiving UART streams, SPI display updates or audio. A common pattern is circular mode with half-transfer and transfer-complete interrupts, so the CPU processes one half of the buffer while DMA fills the other. Pitfalls: on cores with a data cache, like Cortex-M7, I must clean the cache before a transmit and invalidate it after a receive, or place buffers in non-cacheable memory, with buffers aligned to cache lines. The buffer must stay valid for the whole transfer, so never a local stack variable that goes out of scope. Some DMA controllers cannot reach every RAM region, so I check the bus matrix in the reference manual.

Can you answer it under time pressure?

Take a timed medium round and get scored on every answer.

Start mock interview

More medium Embedded Systems Engineer questions