Question
In MX_ADC_Init: what's the difference between ADC_EOC_SEQ_CONV and ADC_EOC_SINGLE_CONV
Posted on November 16, 2017 at 08:49
MCU: STM32F072RB
hadc.Init.EOCSelection = ADC_EOC_SINGLE_CONV;
I have try to set
hadc.Init.EOCSelection as
ADC_EOC_SINGLE_CONV and ADC_EOC_SEQ_CONV to take a look in debug mode using Keil 5.
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc)
{ unsigned char avg_num = 4; if(__HAL_ADC_GET_FLAG(hadc,ADC_FLAG_EOC)) { Adc_raw[adc_id] = HAL_ADC_GetValue(hadc); adc_id++; } if(__HAL_ADC_GET_FLAG(hadc,ADC_FLAG_EOS)) { adc_id = 0; Adc_Vref = 3300*Adc_raw[0]/4095; avg_id++; }}Whatever I choose the EOCSelection, the 2 if condition would be ingoing.
So could someone tell me what's the difference between
ADC_EOC_SINGLE_CONV and
ADC_EOC_SEQ_CONV?
Thanks.
#adc-trigger #stm-32f07 #stm32-adc-interrupt