zephyr/samples/subsys/task_wdt
Manuel Argüelles 832261dbe5 boards: mr_canhubk3: enable SWT watchdog
Enable the Software Watchdog Timer instance on this board.

Now that SWT is enabled for this board and made the default watchdog,
sample.task_wdt.no_hw_fallback can be removed as is no longer needed.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-08-03 05:58:46 -05:00
..
boards boards: mr_canhubk3: enable SWT watchdog 2024-08-03 05:58:46 -05:00
src
CMakeLists.txt
README.rst
prj.conf
sample.yaml boards: mr_canhubk3: enable SWT watchdog 2024-08-03 05:58:46 -05:00

README.rst

.. zephyr:code-sample:: task-wdt
   :name: Task watchdog
   :relevant-api: task_wdt_api

   Monitor a thread using a task watchdog.

Overview
********

This sample allows to test the :ref:`task watchdog <task_wdt_api>` subsystem.

Building and Running
********************

It should be possible to build and run the task watchdog sample on almost any
board. If a hardware watchdog is defined in the devicetree, it is used as a
fallback. Otherwise the task watchdog will run independently.

Building and Running for ST Nucleo L073RZ
=========================================
The sample can be built and executed for the
:ref:`nucleo_l073rz_board` as follows:

.. zephyr-app-commands::
   :zephyr-app: samples/subsys/task_wdt
   :board: nucleo_l073rz
   :goals: build flash
   :compact:

For other boards just replace the board name.

Sample output
=============

The following output is printed and continuously repeated (after each
reset):

.. code-block:: console

   Task watchdog sample application.
   Main thread still alive...
   Control thread started.
   Main thread still alive...
   Main thread still alive...
   Main thread still alive...
   Control thread getting stuck...
   Main thread still alive...
   Task watchdog channel 1 callback, thread: control
   Resetting device...