2021-12-03 09:13 AM
I am trying to catch levels out of threshold using ADC and analog watchdog on NUCLEO-L552ZE-Q. Unfortunately analog watchdog fires interrupt even when value is within the guarded range.
I came across this example: https://community.st.com/s/article/how-to-configure-and-use-the-stm32-adc-analog-watchdog-feature
and it works like a charm! But it doesn't imply catching a single event like I do.
Spend several days trying to figure out the cause and no luck. Please help!
2021-12-03 12:34 PM
It could be that the value which triggered it was already overwritten by the time you looked at it. You have a lot going on in there. Perhaps try a simpler example to convince yourself it's working correctly, or to show that it is not.
2021-12-03 12:57 PM
Yes, this thought also crossed my mind. I tried to change the threshold values blindly and seems like it works. Seems like you are right. Thanks!