am335x watchdog 设备出错

问题描述:

am335x watchdog 设备节点打开失败。
如果是直接将omap_wdt 直接编译成uImage,这样会出现打开文件节点失败的情况。
如果单独编译成模块在后面文件系统内插入则不会。

解决方法:

将omap_wdt 单独编译成模块,在文件系统层添加。
在kernel3.2中:
	make menuconfig
		Device Drivers  --->
		[*] Watchdog Timer Support  --->
		<M>   OMAP Watchdog
将omap_wdt单独编译成模块。

进入文件系统后
insmod omap_wdt.ko
将模块插入进去。
查看是否已经产生了设备节点。
ls /dev/watchdog

如果已经产生了设备节点。
那么可以运行看门狗的测试程序。

下载地址为:git@github.com:chenfulin5/watchdog_test.git

这个工具交叉编译后带一个喂狗时间参数即可。
这个测试程序设定的timeout是10s,如果喂狗时间小于10则可以不断喂狗,但是大于10s则到了10s则会重启。
原文地址:https://www.cnblogs.com/chenfulin5/p/6138243.html