2023-09-13 03:09 AM - edited 2023-09-13 04:01 AM
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.
2023-09-13 06:36 PM
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.