Watchdog

nounStandard termElectronics

A hardware timer that automatically resets a system if software hangs.

A watchdog timer is a dedicated hardware circuit that counts down continuously and must be periodically reset by the main program. If the software freezes or enters an infinite loop, it fails to reset the counter. Once the counter reaches zero, the watchdog triggers a hard reset to bring the system back to a known good state.

Heard on the job

The main loop got stuck waiting for the ADC, so the watchdog kicked in and rebooted the board.

Insider tip

Rookies often place the watchdog reset command inside a timer interrupt, which defeats the purpose since interrupts can continue running even if the main program loop has crashed.

Also heard as

  • watchdog timer
  • WDT