Here is my usage:
ADC configured in repeat sequence mode, sequence length is 2.
FIFO is enabled and I use DMA to transfer FIFO data.
I need 6 conversion results each time, so DMA transfer size is 3 (16bits *2 for each DMA transfer).
After DMA transmission completed, I stop ADC and reconfigured it to different channels.
Then I start ADC and DMA again wait for new 6 results.
Here is my problem:
The TRM said that stop ADC in repeat mode may cause additional ADC conversion, it really happens.
When additional conversion start, this new conversion result will be loaded into FIFO, it caused an extra data inside the FIFO, and the order of data I read from FIFO will be changed.
Is there anyway to flush FIFO when I reconfigure the ADC?
Or it there anyway to stop ADC in repeat mode and do not trigger a new conversion?