Using Watchdog


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


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

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.


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.


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