AnsweredAssumed Answered

Detecting current channel in ADC interrupt callback

Question asked by Mohammad A on Apr 13, 2017
Latest reply on Apr 13, 2017 by Mohammad A

I have enabled analog watchdog in multi channel continues mode and now I'm trying to figure out how to find out which channel has triggered HAL_ADC_LevelOutOfWindowCallback. I have examined hadc->NbrOfCurrentConversionRank but it seems this parameter is always 0 when it reaches to AWD callback.

void HAL_ADC_LevelOutOfWindowCallback(ADC_HandleTypeDef* hadc){
     if(hadc->NbrOfCurrentConversionRank == 1)
     else if(hadc->NbrOfCurrentConversionRank == 2)

How can I find number of the channel triggered AWD?