Project

General

Profile

Using Watchdog

Reference: http://processors.wiki.ti.com/index.php/DaVinci_PSP_03.21.00.04_Device_Driver_Features_and_Performance_Guide#Watchdog.28WDT.29_Driver

DaVinci SoCs have a 64-bit watchdog timer which can be used to reset the hardware in case of a software fault. Once the /dev/watchdog is opened, it will reboot the system unless a user space daemon resets the timer at regular intervals within a certain timeout period. Default timeout of this driver is 60 seconds.

Adding to kernel

  • Edit kernel menuconfig
  • Navigate to drivers/watchdog
  • Enable WatchDog Timer Driver Core and DaVinci watchdog
  • Save and quit
  • Recompile kernel

Warning

Enabling the watchdog timer can affect the DSPs ability to use TSK_Sleep. See the following post for details.

http://e2e.ti.com/support/embedded/tirtos/f/355/t/74121.aspx

Qt Example

Attached is an example qt watchdog source that can be attached to a qt project. It includes a main if you define WATCHDOG_UT if you want to run it by itself. You can test it by kill -STOP <pid> the qwatchdog (or qt project) process and waiting 60 seconds.

qwatchdog.cpp
qwatchdog.h
qwatchdog.pro

Std C++ Example

Below is an example class that can be used to start the watchdog and "poke" the watchdog. It includes a main if you define WATCHDOG_MAIN for an example. You can test it by kill -STOP <pid> and waiting 60 seconds.

watchdog.cpp
watchdog.h
Makefile

Go to top
Add picture from clipboard (Maximum size: 600 MB)