AnsweredAssumed Answered

How to start analog watchdog with interrupt?

Question asked by smrtkai on Mar 16, 2016
Latest reply on Mar 17, 2016 by smrtkai
Hi,

I am having trouble to get the analog watchdog to work. I want to get an interrupt each time the input voltage is not within a given range.

I have configured the analog watchdog for ADC3 with STM32CubeMX as follows:

Watchdog Mode: All regular channels
High Threshold: 3850
Low Threshold: 1050
Interrupt Mode: Enabled

ADC3 is configured with two channels and DMA. ADC is started as follows:

> HAL_ADC_Start(&hadc3);
> HAL_ADC_Start_DMA(&hadc3, memory, size);
> HAL_ADC_Start_IT(&hadc3);

For the interrupt of the analog watchdog, I expect the following callback to get invoked, so I have implemented that function. But unfortunately it is never executed. And I cannot set a breakpoint within that function, when debugging with Keil uVision.

> void HAL_ADC_LevelOutOfWindowCallback(ADC_HandleTypeDef* hadc);

What am I doing wrong? 

Outcomes