2020-08-22 11:42 AM
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,
Solved! Go to Solution.
2020-08-22 12:17 PM
> 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.
2020-08-22 12:17 PM
> 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.