Skip to content

How does the watchdog work? #117

Answered by feilipu
nicklasb asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not 100% sure how to answer your question, or perhaps to address your underlying concern.

The AVR ATmega Watchdog Timer (WDT) is a simple counter that can be configured on roll-over to a) reset the MCU, b) trigger an interrupt, c) trigger and interrupt and if the interrupt is unserviced reset the MCU on the next counter roll-over. The counter is incremented by an integrated oscillator, independent of any other oscillators in the MCU, which runs at nominally 128kHz.

In Arduino FreeRTOS the WDT is configured to firstly interrupt at roll-over and then at the second roll-over then reset the MCU. If you keep the global interrupt disabled for extended times then you will find that your MCU …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by nicklasb
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants