Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AM335x watchdog does not work

I am currently working on TI AM335x board (Starter Kit) and I would like to get the OMAP watchdog working...

As far as I know the platform automatically enables the watchdog during boot and I think it is confirmed by the following messages printed out at boot:

[    1.510192] OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec

If I am not wrong at this point if I issue the following command:

echo 0 > /dev/watchdog

the board should reboot in 60 seconds, isn't it? Instead after 60 seconds nothing happens... why? Am I missing something relevant about that? Can anybody help me?

like image 391
Morix Dev Avatar asked Apr 17 '14 07:04

Morix Dev


People also ask

How do I reset my watchdog?

The act of restarting a watchdog timer is commonly referred to as kicking the watchdog. Kicking is typically done by writing to a watchdog control port or by setting a particular bit in a register. Alternatively, some tightly coupled watchdog timers are kicked by executing a special machine language instruction.

What causes a watchdog reset?

A watchdog timer is used for detecting anomalies such as software stuck in an infinite loop or a frozen CPU. If an anomaly is detected, the processor will be reset automatically, to bring the device back to a stable operational state in the shortest possible time without operator intervention.

How can I tell if watchdog is running on Linux?

After the module is loaded, you can check /dev/watchdog on the Linux system. If this file is present, that means the watchdog kernel device driver or module was loaded. The system periodically keeps writing to /dev/watchdog. It is also called “kicking or feeding the watchdog”.

Is watchdog timer interrupt?

The watchdog timer is configured to generate an interrupt every 250 milliseconds. This interrupt wakes the system from Deep Sleep mode. The system delays 500 milliseconds by calling CyDelay functions and then goes into Deep Sleep again. Two LEDs are used to indicate the system status.


2 Answers

Ok, I've found the solution on my own.

As clearly told here, the file /dev/watchdog must be kept open for allowing the watchdog to fire... then the right command for causing the watchdog fire is:

cat > /dev/watchdog

and then type 0: after 60 seconds the board will reboot.

like image 122
Morix Dev Avatar answered Sep 27 '22 16:09

Morix Dev


It's not necessarily to keep /dev/watchdog open, if you push-on "disable watchdog timer support" (avaliable in Device Drivers->Watchdog Timer Support->...) feature on kernel menuconfig.

like image 37
FatalException Avatar answered Sep 27 '22 16:09

FatalException