I'm having trouble with DMA transfers, specifically the "source wrap" functionality with burst transfer from the ADC channel data registers. Intended theory of operation is as follows:
- ADC is configured with 4 active channels on Conversion Sequence A
- Conversion Sequence A is triggered by hardware timer match
- DMA transfer is triggered by Conversion Sequence A complete
- Transfer all ADC results from ADC Channel Data registers into ping pong buffer arrangement
I never get any values transferred into the buffer by DMA. I set a breakpoint on ADC interrupt to watch the ADC registers and buffer variables. I can see the ADC Channel Data registers change, but the buffers remain empty.
However, if I change line 43 to "kDMA_NoWrap", everything runs as expected. On the first ADC Sequence complete interrupt, the expected values from the ADC Channel Data registers are transferred, subsequent transfers keep stepping through the memory which comes after the ADC Channel Data (because the "wrap" feature is not enabled).
What am I missing?
Code snippet for DMA configuration: