cancel
Showing results for 
Search instead for 
Did you mean: 

Detecting current ADC channel in Analog Watchdog Callback

EGott.1
Associate

Hi there,

this is a question referring to one old post, as I do not know if any solution was found for it or if anything changed after these years:

https://community.st.com/s/question/0D50X00009XkY1mSAF/detecting-current-channel-in-adc-interrupt-callback

.

I am using the Nucleo-L476RG and two analog watchdogs, calling the following HAL function:

void HAL_ADC_LevelOutOfWindowCallback(ADC_HandleTypeDef *hadc) .

Is there any way to detect the current channel which triggered the interrupt ? For me it is crucial to know as I want to implement different operations for different channels after the interrupt is performed.

In the LL-header file I found this function (being unsure if it is a suitable solution): __STATIC_INLINE uint32_t LL_ADC_GetAnalogWDMonitChannels(ADC_TypeDef *ADCx, uint32_t AWDy) .

But after running it in debug mode, I noticed it does not detect dynamically, only statically.

Thank you in advance for your answer.

0 REPLIES 0