As Andrei describedDMA theory and two examples of implementation
, I kept wondering when he’d write about using it the way I often do: a slow peripheral trickling in data until there is enough to run some algorithm on. (To be fair, Andrei kept wondering when I’d write the post about ping pong buffers I’d promised and forgotten about.)
Using ping pong buffers is not a difficult concept, it is just a way of moving memory back and forth so that different parts of the system can use it without colliding. See system architecture below.