Itop-imx6ul Development Board watchdog test routines,the watchdog driver for the Itop-imx6ul Development Board is configured by default and can be used directly with test routines.
version V1.1:1, format modification, 2, the routine modification perfect, which increases the feeding dog code.
1 Watchdog Core driver
The watchdog driver has been configured by default, andthe Imx6ul watchdog watchdog driver source code is
"Drivers/watchdog/watchdog.c".
as shown, select "Device Drivers--->" and enter the carriage return.
as shown, under Device Drivers--->, select Watchdog Timer Support---
>, enter the carriage return.
as shown,"imx2+ Watchdog" is a watchdog driver.
2 Testing
as shown,the IMX6UL's watchdog device node is "/dev/watchdog" and
"/dev/watchdog0", the default two device nodes are available.
The test routine file is "topeet_watchdogtest.c".
in a virtual machine Under Ubuntu, compile the test routines "topeet_watchdogtest.c", using the command "Armnone-linux-gnueabi-gcc-o topeet_watchdogtest topeet_watchdogtest.c -static "compiled, as shown, compiled to get the test program topeet_watchdogtest.
Copy the compiled test program "Topeet_watchdogtest" to the Development Board. The first parameter of the test program is the watchdog device node, and the second parameter is the watchdog restart time.
For example:./topeet_watchdogtest/dev/watchdog 5
After the program executes, as shown, the program will start the watchdog, then feed the dog, and finally stop feeding the dog, the Development Board restarts.
In addition, the first parameter is "/dev/watchdog0", it is also possible to start the watchdog and feed the dog. The command to execute the program is "./topeet_watchdogtest/dev/watchdog0 5", which users can test themselves.
Transferred from:http://www.topeetboard.com
"Share" Itop-imx6ul Development Board driver watchdog watchdog and LINUX-C test routines