AnsweredAssumed Answered

Issue about this Flag: ADC_FLAG_EOS

Question asked by AMP HF on Nov 17, 2017

Background:

1. 1ms timer to trigger adc interruput;

if(htim->Instance == TIM1)//1mS timer
{
HAL_ADC_Start_IT(&hadc);
HAL_GPIO_TogglePin(GPIOA,Pin_15);
}

2. hadc.Init.EOCSelection = ADC_EOC_SEQ_CONV ;

adc interruput callback function:

 

void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc)
{
if(__HAL_ADC_GET_FLAG(hadc,ADC_FLAG_EOC))
{

 

HAL_GPIO_TogglePin(GPIOC,Pin_8);
}
if(__HAL_ADC_GET_FLAG(hadc,ADC_FLAG_EOS))
{
HAL_GPIO_TogglePin(GPIOA,Pin_11);
}

3. MCU: STM32F072RB

When I use oscilloscope to check the adc time sequency, I find this odd:

Channel 1: PC8  Channel 2: PA11  Channel 4: PA15

At some moment, something triggered, the ADC_FLAG_EOS is changed, and it should not appear.

Outcomes