A hardware watchdog is usually a watchdog timer: a register which is hooked up to a clock and when either the register overflows or hits zero it triggers a hardware reset. Your system writes to the register periodically to stop it triggering the hardware reset. If for some reason you stopped writing to the register, something went wrong and the system resets.
Here are some short notes on how to enable the onboard watchdog on the Raspberry Pi:
Run the following command to attempt loading the watchdog kernel module:
sudo modprobe bcm2708_wdog
Now run "lsmod" and look for the line in bold below:
Module Size Used by
bcm2708_wdog 3537 0
This verifies that the watchdog module was loaded successfully. Now edit /etc/modules and add bcm2708_wdog to load the module on boot by running the following command:
sudo echo bcm2708_wdog >> /etc/modules
Install the watchdog package:
sudo apt-get install watchdog
Configure starting the watchdog daemon on boot:
sudo update-rc.d watchdog defaults
sudo chkconfig watchdog on
Edit the watchdog daemon's configuration files and tell it to use the watchdog device. Change the line:
#watchdog-device = /dev/watchdog
to
watchdog-device = /dev/watchdog
Start the watchdog:
/etc/init.d/watchdog start
No comments:
Post a Comment