Skip to main content
RDien
Associate III
December 3, 2021
Question

Why would analog watchdog fire interrupt even when the value is within the guarded range?

  • December 3, 2021
  • 1 reply
  • 995 views

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!

This topic has been closed for replies.

1 reply

TDK
Super User
December 3, 2021

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.

"If you feel a post has answered your question, please click ""Accept as Solution""."
RDien
RDienAuthor
Associate III
December 3, 2021

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!