On this page, you will find usefull informations to configure and use the Watchdog of your APF boards. For the time being there is no watchdog support on the APF9328. Help is welcome to integrate the watchdog on this board.
First be sure to have the Watchdog Linux driver activated:
$ make linux-menuconfig
[*] Watchdog Timer Support ---> <*> IMX2+ Watchdog
If you choose to include driver in Linux kernel then reflash your kernel image.
Otherwise either copy the generated module through NFS to your board or reflash your rootfs.
- If driver is statically linked to Linux, you can choose timeout value at boot time with:
BIOS> setenv extrabootargs imx2-wdt.timeout=5
- Load the module if the watchdog is compiled as a module:
# modprobe imx2-wdt timeout=5
You can now access the watchdog through /dev/watchdog or /dev/watchdog0 device file (depending on your board, /dev/watchdog might be the 1 minute software Linux watchdog):
- to activate it, just open the file, then you will have to write to this file regularly or your system will be reseted.
- there is a small daemon useful to periodically trig the watchdog and reset or reboot your board on timeout (here reset watchdog every 3 seconds and ask to reboot after 5s if not serviced):
# watchdog -T 5 -t 3 /dev/watchdog
If your system hangs, the daemon can't trig the watchdog and your system is reseted. To quickly check that you can do a:
# kill -19 PID (where PID is the one of watchdog process and -19 == SIGSTOP signal)