cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F407 Ref manual: Question about the ADC data management section 13.8.3

AAnth.1
Senior

Hi,

Reading the Ref Manual of the STM32F407, section 13.8.3 Conversion without DMA and without overrun detection, I am not sure I understand the logic behind.

The Ref manual says:

"13.8.3 Conversions without DMA and without overrun detection

It may be useful to let the ADC convert one or more channels without reading the data each

time (if there is an analog watchdog for instance). For that, the DMA must be disabled

(DMA = 0) and the EOC bit must be set at the end of a sequence only (EOCS = 0). In this

configuration, overrun detection is disabled".

Let us assume that I have 4 channels in a regular group that I want to sequentially measure (SCAN mode enabled). All 4 channels share the same one and only data register ADC_DR.

If I set EOCS=0, the EOC bit will be set at the end of the sequence (i.e. after the 4th channel conversion), what will happen to the data of the first 3 channel conversion? That data will be lost, wouldn't it?

Thank you,

1 ACCEPTED SOLUTION

Accepted Solutions
TDK
Guru

> what will happen to the data of the first 3 channel conversion? That data will be lost, wouldn't it?

Yes, it is lost. To convert more than 1 channel in sequence, you need to use DMA unless you don't care about data being overwritten. Unless you can poll it after each conversion.

0693W000003Q31VQAS.png

If you feel a post has answered your question, please click "Accept as Solution".

View solution in original post

1 REPLY 1
TDK
Guru

> what will happen to the data of the first 3 channel conversion? That data will be lost, wouldn't it?

Yes, it is lost. To convert more than 1 channel in sequence, you need to use DMA unless you don't care about data being overwritten. Unless you can poll it after each conversion.

0693W000003Q31VQAS.png

If you feel a post has answered your question, please click "Accept as Solution".