How to start analog watchdog with interrupt?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2016-03-16 8:48 AM
Posted on March 16, 2016 at 16:48
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 channelsHigh Threshold: 3850Low Threshold: 1050Interrupt Mode: EnabledADC3 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?
This discussion is locked. Please start a new topic to ask your question.
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2016-03-17 2:48 AM
Posted on March 17, 2016 at 10:48
I have simply forgotten to enable global interrupts for the ADCs.
