Determining where in a buffer a DMA is when it's execution is stopped. | Cypress Semiconductor
Determining where in a buffer a DMA is when it's execution is stopped.
Hello, I've actually got a couple questions, one more trivial that I just haven't tested and one more specific which I haven't be able to find anything about in the DMA Application notes.
1) When you disable the signal to drq, will a DMA stop operating even if the TD is only partially complete it's Transfer Count? ie, you have an ADC's eoc feeding into a DMA which transfers that data to a array of 200 bytes (100 samples at 2 Bytes per sample) and you suppress the eoc signal (say, with a control register and an AND gate) so the DMA no longer receives the EOC rising edge, will the DMA pause even though the TD hasn't finished it's Transfer Count?
2) Once the DMA is paused, is there any good way to figure out where in the buffer execution ceased? In particular, I want to use an ADC to fill a ring buffer in memory until until a coarse event occurs (ADC output goes above a set level), then pause the ring buffer and starting from the latest value work backwards to the start of the event.
Is there a way to do this? Or perhaps I need to do something tricky like synchronize a second DMA set the next value to -1 every time the DMA runs so I have a known value I can search for?
Thanks for looking at this,