Monday, September 19, 2011

Watchdog in Embedded Linux

[1] Embedded Freak

To use watchdog peripheral in Linux, you will need:
Watchdog driver: Most of board suppliers will provide you for free (ask their support if you need to). This article is using EA3131 Linux BSP’s provided watchdog driver.
Watchdog device file: Device file is a special kind of file to mark the device node in your root filesystem (so you can access the peripheral like accessing file..’everything is a file’ in UNIX system). Normally it is called ‘/dev/watchdog’

RESULT OF RUNNING DEMO FROM [1] ON LPC3240 BOARD
---------------------------------------------------
[root@LIQ-GateWay user]# ./WatchDogTest
Current watchdog interval is 19
Last boot is caused by : Power-On-Reset
Use:
< w > to kick through writing over device file
< i > to kick through IOCTL
< x > to exit the program
w
Kick watchdog through writing over device file
Unknown command
w
Kick watchdog through writing over device file
Unknown command
i
Kick watchdog through IOCTL
Unknown command
i
Kick watchdog through IOCTL
Unknown command

No comments: