Watchdog on Beaglebone

How do I enable the watchdog to work on Beaglebone/Angstrom? I tried writing to /dev/watchdog which appears to return without error, but the system does not reboot even after waiting several minutes. The output of dmesg is:

[23084.830139] omap_hwmod: wd_timer2: _wait_target_disable failed
[23084.833801] omap_hwmod: wd_timer2: _wait_target_disable failed

Best,

Dave.

How do I enable the watchdog to work on Beaglebone/Angstrom? I tried
writing to /dev/watchdog which appears to return without error, but the
system does not reboot even after waiting several minutes.

Check whether you have CONFIG_WATCHDOG_NOWAYOUT=y?

Help for the config option:
The default watchdog behaviour (which you get if you say N here) is to stop the timer if the process managing it closes the file /dev/watchdog. It's always remotely possible that this process might get killed. If you say Y here, the watchdog cannot be stopped once it has been started.

The output of
dmesg is:

[23084.830139] omap_hwmod: wd_timer2: _wait_target_disable failed
[23084.833801] omap_hwmod: wd_timer2: _wait_target_disable failed

This is alarming for me... what is your PSP release/kernel version? I believe since it is Angstrom, it must be 3.1 kernel?

Thanks,
Vaibhav

Check whether you have CONFIG_WATCHDOG_NOWAYOUT=y?

Thanks! That must have been it as I was closing the fd every time. I think it is a stock kernel from the pre-built Beagle bone images. See uname output below.

dmesg is:

[23084.830139] omap_hwmod: wd_timer2: _wait_target_disable failed
[23084.833801] omap_hwmod: wd_timer2: _wait_target_disable failed

This is alarming for me... what is your PSP release/kernel version? I believe since it is Angstrom, it must be 3.1 kernel?

uname -a
Linux argus2 3.1.0+ #1 Mon Jan 9 21:55:50 CST 2012 armv7l GNU/Linux

I am using the following kernel:

3.1.0+ #1 Mon Jan 9 21:55:50 CST 2012 armv7l GNU/Linux

Although the watchdog appears to work with this very simple Python script:

#!/usr/bin/env python

import time
import os

os.nice(20)
time.sleep(60) # Grace period before starting
wd = open("/dev/watchdog", "w+")
while 1:
     wd.write("\n")
     wd.flush()
     time.sleep(5)

I get the following messages from dmesg every time I write to the watchdog:

...
[ 1980.162269] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 1985.182097] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 1990.202167] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 1995.222106] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 2000.242264] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 2005.270812] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 2010.292287] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 2015.312251] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 2020.332102] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 2025.352160] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 2030.380727] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 2035.402219] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 2040.430755] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 2045.452216] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 2050.480777] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 2055.502156] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 2060.509628] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 2065.533523] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 2070.544298] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 2075.559779] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 2080.582223] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 2085.592113] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 2090.612247] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 2095.632107] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 2100.652170] omap_hwmod: wd_timer2: _wait_target_disable failed
[ 2105.662094] omap_hwmod: wd_timer2: _wait_target_disable failed
.....

Regards,

Dave.

Hi,

As a sugestion, if it’s not mandatory to your application, you can also make a Ubuntu netinstall on your BeagleBone.
It comes with kernel 3.2, and watchdog timer works:
http://elinux.org/BeagleBoardUbuntu#Method_2:_Use_the_NetInstall_method

Regards,

Daniel

Use the PSP Release from arago tree. It dosent have any issue in wdt

http://arago-project.org/git/projects/?p=linux-am33x.git;a=shortlog;h=refs/heads/master