What is a Watchdog Timer?
A watchdog timer supervises software progress by requiring service before a deadline. Feeding should represent real task health, and recovery must disable unwanted motion rather than assuming a controller reset is sufficient.
The key idea
A watchdog timer expects healthy software to service it before a timeout. If that deadline is missed, the device can interrupt or reset the controller. In a robot, servicing can depend on completion of both control and sensor tasks so the heartbeat reflects meaningful progress. Automatically feeding the watchdog from a timer interrupt can hide a stalled application whose interrupt still runs. Recovery should disable motor outputs and record the reset cause. Although the watchdog assists recovery from software failures, reset behavior must be designed around the robot’s actual motion and control needs.
What to remember
- Service the watchdog only when required tasks demonstrate progress.
- A missing service deadline triggers an interrupt or reset.
- Recovery should disable unwanted motor output and record the cause.
Check your understanding
Why can feeding a watchdog from a timer interrupt be misleading?
Show the explanation
The interrupt may continue feeding it even when the main application is frozen.