Watchdog timer

From Mech
Revision as of 21:27, 25 December 2007 by LIMS (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

I've never seen an embedded controller that doesn't occasionally "hang" and require a reboot. It can be due to a software or a hardware failure. A watchdog timer can be set up to detect a "hang" condition and reboot the controller. Supposedly. You include a restart_wdt() in your code so that it occurs regularly. Set the watchdog's timeout period so that, if your code is working properly, the restart_wdt() is called often enough that the WDT never times out. If your code hangs, the WDT will time out and reboot the controller. Supposedly. See Watchdog.c