AnsweredAssumed Answered

Resetable DMA for predefind amount of transfers

Question asked by piet t on Feb 10, 2018
Latest reply on Feb 11, 2018 by Clive One

Hey everyone,


I've got a small issue.


I've got a Dma that fills a buffer(Double buffer so 2 actually) with data at every rising clock edge. I only want this clock to trigger the DMA 192 times until a reset signal is received. Once the reset signal is received, the DMA should just carry on where it left off, so position 193 of the buffer.

This image tries to portray what Im trying to do. I have 192 cycles of data, followed by junk until the reset signal is received.So I want the Timer to trigger the dma for 192 rising edges, stop and wait for reset and then repeat.



Essentially this is what my timer configuration is like. An input capture which triggers the dma every rising edge and then a slave mode set for reset.


If I cant do this directly on the timer, is there a way that I could cascade two timers, where the timer would come in between the 2.5 MHZ signal and the timer that triggers the dma, pass through the clock signal and stop once 192 pulses have been received and restart on reset.Something like this:




I've tried a few implementations with cascaded timers and gated mode, but due to the gated mode not resetting the counter it doesn't seem to help. I've also found nothing on the forum but seen a few similar questions.


Thanks in advance for any help.

Not sure if I'm missing something obvious >.<