Linux – How to disable a watchdog, once it has been enabled

linuxwatchdog

I created a watchdog daemon application with a time interval of 30 seconds; for every 5 seconds, I am trying to hit the watchdog counter, and it's working fine. If I kill this daemon process it shows the following:

mxc_wdt: Unexpected close, not stopping!

Then, my device gets reset after my time interval goes to zero (i.e.,hardware counter count down to zero).

I even configured CONFIG_WATCHDOG_NOWAYOUT=N in kernel.

Is there any process to disable this watchdog functionality at user bash prompt? I observed disable not supported by this chip in kernel mxc_wdt_disable function.

Best Answer

Normally to shut down the watchdog driver you have to write a 'V' character to /dev/watchdog which you could do from a root bash prompt just with:

echo 'V' > /dev/watchdog  

However, before you try to create your own watchdog driver take a look at the existing Linux watchdog daemon to see if it can do the job. A good start is my page here: http://www.sat.dundee.ac.uk/~psc/watchdog/Linux-Watchdog.html

Related Question