Skip to main content
Visitor
July 22, 2026
Question

STM32CubeMX ADC missing 'DISABLE' option for EOC ?

  • July 22, 2026
  • 0 replies
  • 1 view

Hi,

 

I was making a demo project so needed a really straightforward way to use the ADC of my STM32F446RE.
I configured the ADC1 with only channel. Default parameter everywhere except I enabled ‘Continuous Conversion Mode’ as I understood it, all I had to do with it was to start the ADC (HAL_ADC_Start(&hadc1)) and pick the values every time my loop needed it. I was surprised to notice that ‘HAL_ADC_PollForConversion(&hadc1, 100)’ worked only the first call then always yield HAL_TIMEOUT as I was expecting the ‘Continuous Conversion’ mode to allow me to not call HAL_ADC_Start and stop every time.

After finding the linked post, I found the solution was to change the ADC setting 

from hadc1.Init.EOCSelection = ADC_EOC_SINGLE_CONV 
Into hadc1.Init.EOCSelection = DISABLE
 
The thing is this option is not available in STM32CubeMX (V6.17.0) so I have to pick either ADC_EOC_SINGLE_CONV or ADC_EOC_SEQ_CONV.
I have the behavior I wanted but I wonder if this can be improved in STM32CUBEMX or is there something I don’t understand ?
 

Still according to this link this configuration set should be officialy supported as it’s in the exemple file.

https://github.com/STMicroelectronics/STM32CubeF4/blob/master/Projects/STM324xG_EVAL/Examples/ADC/ADC_RegularConversion_Interrupt/Src/main.c

 

NOTE: So after writing all of this I noticed that ADC_EOC_SEQ_CONV is also defined as ‘0’ like just like ‘DISABLE’ so it would have work if I picked ‘EOC flag at the end of all conversion’ instead ‘EOC flag at the end of single channel conversion’ but I think it’s missleading