cancel
Showing results for 
Search instead for 
Did you mean: 

CONVERSION OVERRUN IN ADC SCAN MODE

ramasubbu
Associate II
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? 

4 REPLIES 4
T J
Lead
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.

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
Up vote any posts that you find helpful, it shows what's working..
pohtv
Associate II
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.

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