ZERO
ZERO copied to clipboard
dacdma.ino with pingpong buffer + interrupts
Hello @manitou48
I am looking to implement a waveform generator and has been glad to find your "dacdma.ino" example. I'm just missing:
- a mean to handle two buffers operating in ping-pong: one is used by the DMAC while the other is accessible to the program to store the next block to be transmitted by DMA. And vice versa, the thwo buffers are swapped when the DMAC has completed the transmission of a block
- An interrupts mechanism for the DMAC to inform the program that a block transmission completed and which block. I tried to study the SAMD21 datasheet, but it's that complex that I'm hoping for some help.
Regards, Jean-Paul