DMA, double buffering and cache coherency
Study block-oriented data movement, buffer ownership and target-specific coherency considerations.
View lesson accessAll lessonsWhat the lesson covers
The course lesson is called The buffer that never stops. The ADC interrupts the CPU for every sample. At 100 kHz the CPU does nothing but enter and leave the interrupt. DMA moves the samples by itself, and the CPU only needs to be ready for each block.
- DMA
- ping-pong buffers
- write pointer as head
- cache coherency
- buffer ownership
Before you start
Question to think about: When does ownership of a completed buffer transfer between the hardware and software?
Preparation exercise: Draw producer and consumer lifetimes for two buffers; specify how reuse is prevented while data is still in use.
This is an original public study prompt, not the paid lesson or its solution. The interactive course contains the walkthroughs, labs, exercises and recaps.
Read the free embedded C articles for additional practice.
Test your understanding
Practice free firmware interview questions and mock interviews · Assess your readiness