AnsweredAssumed Answered

Will DMA restart in circular mode clear previous unfinished array?

Question asked by chen.richie on Aug 4, 2014
Latest reply on Aug 7, 2014 by chen.richie
Dear all, 

We are using DMA connecting with an ADC though SPI in circular mode. ADC results will be loaded into array1[320] and arrary2[320].

My question is sometimes I need to stop DMA transmission and restart it later. However, the stop action may happen in the middle of a transmission without filling a destination array. Say arrary1[] is half filled to array1[159]. When the DMA is restarted, will arrary1[] be filled after the previous write, which is  array1[159]? Or will arrary1[] be filled from the very beginning at arrary1[0]?

I wish it to be the second condition, since we need some sort of synchronization. If array1[] will not be filled at the very beginning after restart, what should I do to make it like that? 

My current way of restart is simply close by clear enable DMA bit; and open by set the enable DMA bit.

Thank you very much.. :)