Skip to main content
ionutF
Associate III
July 27, 2017
Solved

ADC not scanning all channels

  • July 27, 2017
  • 2 replies
  • 920 views
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.
    Best answer by ionutF
    Posted on August 01, 2017 at 20:16

    ADC_Wait(ADC1,ENABLE) fixed the problem

    2 replies

    Tesla DeLorean
    Guru
    July 27, 2017
    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
    August 1, 2017
    Posted on August 01, 2017 at 20:16

    ADC_Wait(ADC1,ENABLE) fixed the problem