ARMLinux driver transplantation Watch Dog Timer (watchdog) driver transplantation

Publisher:SparkleMagicLatest update time:2016-06-08 Source: eefocusKeywords:ARM Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Hardware platform: FL2440 (S3C2440)

Kernel version: 2.6.28

Software platform: Ubuntu 11.04

Kernel version: 2.6.39

Cross compiler: arm-linux-gcc 3.4.1

Original work, please indicate the source when reprinting

1. Load the watchdog driver

insmod wdt.ko

wdt.ko is the driver file name. If no parameters are added and the dog is not fed, the interrupt function will be executed when the counter reaches 0 (set the state of the LED, then feed the dog, and reset the value of WTCNT)

Optional parameters

module_param(tmr_margin, int, 0);
module_param(tmr_atboot, int, 0);
module_param(nowayout, int, 0);
module_param(soft_noboot, int, 0);
module_param(debug, int, 0);

When soft_noboot is set to 0, if the dog is not fed, the development board will reset insmod wdt.ko soft_noboot = 0

For details of the driver, see: http://blog.csdn.net/yming0221/article/details/6595265

ARMLinux driver transplantation Watch Dog Timer (watchdog) driver transplantation
 

In this way, the watchdog device file is automatically generated under /dev/

Just enter the content into the file to start the watchdog

echo 1>/dev/watchdog

ARMLinux driver transplantation Watch Dog Timer (watchdog) driver transplantation
 

In this way, you can see the LED light on the development board flashing regularly, indicating that the transplantation is successful.

To stop the watchdog, execute

echo V > /dev/watchdog

Keywords:ARM Reference address:ARMLinux driver transplantation Watch Dog Timer (watchdog) driver transplantation

Previous article:Analysis of ARMLinux driver Watch Dog Timer (watchdog) driver
Next article:S3C2440 Driver - Watchdog Driver Analysis

Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号