Learning path

Full curriculum

Full curriculum

Arrows go from each prerequisite to the units that depend on it. Hover or focus a unit to highlight its path.

Unit content

Watchdog timers and fault recovery

A watchdog timer is a hardware timer intended to detect firmware that is no longer making acceptable progress.

Software must periodically service or feed the watchdog before its timeout. If servicing stops, the watchdog expires and triggers a recovery action such as resetting the processor.

The watchdog should be serviced only after the software has evidence that the important work is still healthy. Feeding it unconditionally from a timer interrupt can hide a deadlocked or failed main application forever.

A windowed watchdog can require servicing within an allowed time interval, detecting both software that runs too slowly and software that loops unexpectedly fast through the service operation.

After a watchdog reset, firmware can record or inspect the reset cause and choose a safe startup path where appropriate.

A watchdog cannot prove correctness. It provides an independent time-based escape path for some classes of hangs and loss of progress.