"Share" Itop-imx6ul Development Board driver watchdog watchdog and LINUX-C test routines

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.