Skip to main content
Visitor II
September 13, 2023
Question

AWD on the STM32F3Discovery

Hello everyone, I am new to the world of STM32 and trying to get an AWD going on the STM32F3Discovery, this with no success. I have followed the following guide, https://community.st.com/t5/stm32-mcus/how-to-configure-and-use-the-stm32-s-adc-analog-watchdog-feature/ta-p/49822. But the watchdog never seems to triggers even if the ADC value is way above the threshold . The code is below, thank you for any response.

Kind regards.

 

This topic has been closed for replies.

1 reply

TDK
September 14, 2023

At a minimum, ubAnalogWatchdogStatus should also be declared as volatile.

With continuous conversions set and a 1.5 cycle sample time, you could be swamping the CPU with interrupts so much that it won't run any code in the main thread. Debug, step through code to verify it makes progress.

"If you feel a post has answered your question, please click ""Accept as Solution""."