Watchdog timer
From Mech
Jump to navigationJump to searchI'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