Watchdog Timer

Hi Luca26,

I have it compiled into the kernel.
It doesn't start on boot.. shall I make it a module and then that will
work?

Cheers,
CJ

In my short experience with using the linux watchdog, the watchdog does not come up in a state until an external program has opened the watchdog file.

After the file has been opened by a program, the watchdog has to be triggered regularly or the system will be reset. If the kernel has the NOWAYOUT option set, then once the watchdog is first opened, you’ll have to keep triggering the watchdog forever, but it seems that you can trigger it from multiple programs, as long as they have permission to open the /dev/watchdog file.

I would bet that you could write a simple shell script to open the watchdog.

cat /dev/watchdog

would open it from the command line with its default parameters, and then your machine would probably reset 60 seconds later, assuming that you don’t do something else to trigger the watchdog.

Wim.

Hi Cjnz,
what do you mean with "it doesn't start" ?
Have you got the file /dev/watchdog ?

Now I tried the watchdog as said before.

int watchdog_fd = open("/dev/watchdog", O_WRONLY); \\open the
watchdog file
if (watchdog_fd >= 0)
{
     int flags_abilitazione_wd = WDIOS_ENABLECARD;
     ioctl(watchdog_fd, WDIOC_SETOPTIONS,
&flags_abilitazione_wd); \\enable the watchdog
     int watchdog_timeout = 20; //20 secondi prima
riavviare la scheda
     ioctl(watchdog_fd, WDIOC_SETTIMEOUT,
&watchdog_timeout); \\ set 20 sec timeout
}

after that I don't write the WDIOC_KEEPALIVE so I expect my board to
reboot after 20 second but it only halt and doesn't restart.

What do you think about?

I tried the same watchdog in beagleboard c4 and xm.
It works fine in the c4 (it reboot correctly when the timeout
occurs) .
In the Xm the board only halt and doesn't reboot.

I'm using the same Angstrom downloaded from http://www.angstrom-distribution.org/narcissus/
.

does someone used watchdog successfully with BB xM ?

I try again....

Does someone used watchdog successfully with BB xM ?

I can't use it. After WD timeout, the BB xM halt but doesn't reboot.
It works fine with BB C4 .

Currently, I have the same problem with DM3730 and TPS65950 (on BB-xM). Have-you solve it?

Thanks in advance.
Pierre