Needed help in ADC callback using Interrupts.
__IO volatile uint8_t ADC_ConversionFlg=0;
void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef *hadc)
{
/* Prevent unused argument(s) compilation warning */
/*
ADC_ConversionFlg |= 0x01;
CTP=HAL_ADC_GetValue(&hadc1);
}
MX_ADC1_Init();
HAL_ADC_Start_IT(&hadc1);
while (1)
{
if (ADC_ConversionFlg & 0x1){
//CTP=HAL_ADC_GetValue(&hadc1);
ADC_ConversionFlg &= ~(0x01);
}
}
So i am using the Interupt method to get the converted value but after the conversion when the
callback is triggered and the value is stored ,it is not exiting from the callback function,
it should go to the while loop and continue , but it is stuck in the callback function only ,
what could be the reason , can someone help?
