Skip to main content
ramasubbu
Associate
December 25, 2017
Question

CONVERSION OVERRUN IN ADC SCAN MODE

  • December 25, 2017
  • 4 replies
  • 1261 views
Posted on December 25, 2017 at 13:06

Hi ,

I am using STM32F407

ADC  - while conversion in scan mode of regular sequence.when overrun occurs it needs to start(SWSTART) the conversion again.if i do that what will happen to the sequence

it will start again from the beginning or it continue the sequence? 

    This topic has been closed for replies.

    4 replies

    T J
    Senior III
    December 25, 2017
    Posted on December 25, 2017 at 21:34

    generally you would run the ADC in continuous conversion mode with a circular buffer being feed by the DMA.

    that way all of the ADCs are scanned and stored for you in the same place every time.

    then check end-of-conversion or enable the interrupt.

    it should never overrun again.

    Tesla DeLorean
    Guru
    December 26, 2017
    Posted on December 26, 2017 at 18:09

    Why does it overrun? For multiple channels use DMA, with a buffer that accommodates all your channels.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    pohtv
    Associate
    January 3, 2018
    Posted on January 03, 2018 at 14:18

    Hi v.ramasubbu,

    In my test, I see that it restarts the sequence after

    SWSTART

    is re-issued on overrun. However, I did not do a thorough test. So don't take my word for it. I agree that the STM32 documentation on ADC for Scan Mode is too scant. 

    p/s: remember to clear the overrun flag before re-issuing SWSTART

    .

    edited:

    On flipping though one of the manuals (STM32f429ZI reference manual, to be precise), I found section 13.8.2 Managing a sequence of conversions without using the DMA, which states how to recover from an overrun. But again, it does not say clearly if that would restart the sequence.

    @Clive One: Overrun do happen even in DMA.

    ramasubbu
    ramasubbuAuthor
    Associate
    January 4, 2018
    Posted on January 04, 2018 at 06:36

    Hi,

    Thanks  , From my side also the same behavior with over run ,

    Now am trying with DMA in that i have one doubt in FIFO config. if you worked on that please answer the below post i have posted yesterday

    @ADC with DMA FIFO Circular mode Memory Config Doubt