Watchdog Timer

Computer Engineering

How It Works

A watchdog timer is an autonomous hardware safety supervisor designed to detect and rescue microcontrollers from firmware lockups, deadlocks, and execution faults. Clocked by an independent on-chip oscillator, the timer decrements continually from a programmed reload value. Firmware must periodically execute a service instruction ('kicking the dog') before the counter underflows; if a software hang stalls servicing, the timer reaches zero and drives an unmaskable hardware system reset.

Governing Equation
T_{timeout} = (Prescaler · Counter_{reload}) / f_{WD_osc}