9

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.

Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227

1 Answers1

8

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

Rui F Ribeiro
  • 55,929
  • 26
  • 146
  • 227
Paul Crawford
  • 414
  • 5
  • 6
  • goddamit! my kgdb session kept getting screwed up and I couldn't figure out what was going on. Freaking hardware watchdog! I forgot to disable it. Since I don't need debug the kernel for a few months sometimes, I forget all of these details. I need to write a readme to remind myself. – Daniel Santos Mar 24 '20 at 06:13
  • $ echo 'V' | sudo tee /dev/watchdog # did nothing under Debian bookworm/sid. ps-e | grep watchdogd; shutdown -> "Watchdog0 did not stop". My UEFI lacks a disable watchdog option. – Paul Jun 23 '22 at 13:24