Skip to main content
SWenn.1
Senior III
Jan 5, 2022 2:23 AM UTC
Question

ADC conversion using End of Conversion Selection?

Good evening....

I would like to do an A/D conversion on Channel 9 and Channel 10. I have a timer that goes off every second and within this ISR I call HAL_ADC_Start_IT. The ISR gets called upon conversion complete. Now the question is End of Conversion Selection: Should it be 'End of Single Conversion' or 'End of Sequence of Conversion'?? Even though I am sampling multiple channels is this considered a sequence or a single conversion of multiple channels, given that I am using a timer to trigger this single event every second???? This is not explained well and confusing.

Thanks

Steve

This topic has been closed for replies.

4 replies

OAgui.1
Associate II
Sep 26, 2022 11:16 AM UTC

Please, anyone can answer this question?

Same doubt for me.

Oliver

AScha.3
Super User
Sep 26, 2022 11:35 AM UTC

rtfm.

depends on your selection, what ISR you want/need:

0693W00000SwFDcQAN.png

If you feel a post has answered your question, please click on " Best Answer ".
PFC
Visitor II
Apr 1, 2024 2:18 PM UTC

There is no EOS flag!

From the ADC block diagram

PFC_3-1711980639422.png

PFC_0-1711980156978.png

But, the End of Conversion (EOC) flag (in ADC_SR reg) can be triggered at the end of each conversion or at the end of a sequence, depending on the EOCS bit (in ADC_CR2 reg)

 

 

PRenn.1
Associate III
Jan 16, 2025 3:36 PM UTC

Close but no cigar.  The OP wanted to know what to do in case of a  multi channel conversion Setup.
I just tried that on a STM32F411 with four channels setup.   The ADC-with-DMA is started every 100ms fro the TIM2 ISR.  Both the TIM2 callback (starting the ADC) and the ADC ConversionComplete callback contain each their own "visit counter"  tim_convs++ and adc_convs++;
And irrespective of what I configure in the CubeIDE ADC-setup, both values always rise in parallel!
So End of Single conversion (once per channel one would expect) and End of Conversiopn group (once per channel group) behave exactly identical. 
=> in DMA mode  ADC End-of-Single-conversion  (one Interrupt, more precise one callback call per conversion) does not exists, behaviour is always "callback at End-of-Conversion-Group."