AnsweredAssumed Answered

DMA Channels Problem (Using DMA to Emulate ADC Flexible Scan Mode)

Question asked by anouarraddaoui on Oct 2, 2016



I am trying to use 2 DMA channels to read  ADC results from 3 different ADC channels and save them in SRAM using DMA.

The code below works just fine if I use the DMA channels 0 and 1. It works also fine with channel 0 and anyone of the rest 15 channels. But for my project, I need channels 0 and 1 for something else. Therefore I need to use DMA channels other than 0 and 1. 

I tried several combinations (channel 2 and 3 / 3 and 4 / 6 and 7 ....) but I am always getting false ADC values.

(See the screenshot below: the ADC value I should be getting in the first column is about 45100, which occurs SOMETIMES. When using DMA channels 0 and 1, I am ALWAYS recieving, as expected the right value.)


The code below is written based on the application note : "Using DMA to Emulate ADC Flexible Scan Mode".


Can anyone help figuring out the reason and how to solve it ?

Thank you

and here are the values using channel 0 and 1 :

Original Attachment has been moved to: ADC0_DMA_looking-for-channels.rar