Watchdog Timer
What is a Watchdog Timer?
A watchdog timer is a hardware feature used to monitor system operation and detect if a program has become unresponsive or running out of control. It is commonly referenced as WDT in manuals and technical documentation.
The WTD contains an internal counter that continuously increments, along with software designed to regularly clear (reset) the counter to prevent overflows. When an overflow occurs, the WDT triggers an interrupt or reset.
In the case of an electric kettle, the WDT can prevent overheating in the case of abnormal operation, such as the heater failing to turn OFF even after reaching the set temperature.
Watchdog Timer Configuration
The WDT features a counter that continuously increments and cannot be stopped by the program, potentially causing an overflow if left unchecked.
To prevent this, the program must periodically clear the counter.
Software designers implement this mechanism to ensure that the system is running as intended.
However, if the counter is not cleared, it indicates a program malfunction, such as a freeze or unexpected error. In such cases, depending on the MCU specifications, the WDT can trigger an interrupt or reset.
This interrupt allows the system to safely execute a controlled halt or, in the case of an MCU reset, forces a system reboot to restore normal operation.
These functions help prevent issues even if an abnormality occurs in the MCU.