cancel
Showing results for 
Search instead for 
Did you mean: 

Issue about this Flag: ADC_FLAG_EOS

AMP HF
Associate II
Posted on November 17, 2017 at 08:23

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


_legacyfs_online_stmicro_images_0690X0000060N14QAE.png

At some moment, something triggered, the 

ADC_FLAG_EOS is changed, and it should not appear.

#adc_flag_eos #interrupt-issue
0 REPLIES 0