Skip to main content
ionutF
Associate III
Jul 27, 2017 10:14 AM UTC
Solved

ADC not scanning all channels

Posted on July 27, 2017 at 12:14

Perhaps the title is wrong, but my code behaves like this: I have configured 4 channels to be converted in the ADC; 

I have put a variable which increments inside ADC irq EOC (

EOC_Counter

) and another which increments inside ADC irq EOSQ. 

EOC_Counter 

    This topic has been closed for replies.
    ionutF
    ionutFBest answer
    Associate III
    Aug 1, 2017 8:16 PM UTC
    Posted on August 01, 2017 at 20:16

    ADC_Wait(ADC1,ENABLE) fixed the problem

    2 replies

    Tesla DeLorean
    Guru
    Jul 27, 2017 3:53 PM UTC
    Posted on July 27, 2017 at 17:53

    Yeah, I'd generally avoid doing that, the DMA TC/HT should be used as an EOC for multiple channels. ie all 4 complete, or multiple thereof.

    DMA is likely to end-run any EOC interrupt from the ADC.

    Your description lacks a lot of clarity. Rather than try and explain, post a clear and concise code example demonstrating the issue.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    ionutF
    ionutFAuthorBest answer
    Associate III
    Aug 1, 2017 8:16 PM UTC
    Posted on August 01, 2017 at 20:16

    ADC_Wait(ADC1,ENABLE) fixed the problem