Difference between revisions of "Watchdog"
(→Usage) |
|||
Line 25: | Line 25: | ||
== Usage == | == Usage == | ||
− | Load the module: | + | Load the module (here with a 5 secs timeout): |
<pre class="apf"> | <pre class="apf"> | ||
− | # modprobe watchdog | + | # modprobe watchdog timeout=5 |
</pre> | </pre> | ||
You can now access the watchdog through ''/dev/watchdog'' device file: | You can now access the watchdog through ''/dev/watchdog'' device file: | ||
− | * to activate it, just open the file: | + | * to activate it, just open the file, then you will have to write to this file regularly or your system will be reseted. |
+ | {{Note|On APF27 watchdog is then unstoppable and will reset your board if you don't service it}} | ||
+ | |||
+ | * there is a small daemon useful to periodically trig the watchdog (here every 3 seconds): | ||
<pre class="apf"> | <pre class="apf"> | ||
− | # | + | # watchdog -t 3 /dev/watchdog |
</pre> | </pre> | ||
− | + | if your system hangs, the daemon can't trig the watchdog and your system is reseted. To quickly check that you can do a: | |
<pre class="apf"> | <pre class="apf"> | ||
− | # | + | # killall watchdog |
</pre> | </pre> | ||
== Links == | == Links == | ||
* | * |
Revision as of 23:13, 8 March 2009
Page under construction... Informations on this page are not guaranteed !!
!! This page is under construction and Watchdog driver is still not integrated in current software version !!
On this page, you will find usefull informations to configure and use the Watchdog of your APF boards.
Contents
Configuration
First be sure to have the Watchdog Linux driver activated:
$ make linux26-menuconfig
[*] Watchdog Timer Support ---> <M> IMX Watchdog
$ make
Installation
If you choose to include driver in Linux kernel then reflash your kernel image.
Else either copy the generated module through NFS to your board or reflash your rootfs.
Usage
Load the module (here with a 5 secs timeout):
# modprobe watchdog timeout=5
You can now access the watchdog through /dev/watchdog device file:
- to activate it, just open the file, then you will have to write to this file regularly or your system will be reseted.
- there is a small daemon useful to periodically trig the watchdog (here every 3 seconds):
# watchdog -t 3 /dev/watchdog
if your system hangs, the daemon can't trig the watchdog and your system is reseted. To quickly check that you can do a:
# killall watchdog