Part 1
요약·해설
Main/control thread sequence, channel callback과 반복 reset을 설명합니다.
Task watchdog channel
Hardware watchdog
Device reset
Part 2
접을 수 있는 영어 원문 전체
영어 원문 전체 펼치기
5E6C9E2921A68DF2BDE47D29194519944262456CC8508003975F58102E8F5DAB
.. 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...
Part 3
한국어 전문 번역
개요
Task watchdog subsystem을 시험하고 thread 하나가 정상적으로 진행되는지 감시하는 sample입니다.
빌드 및 실행
거의 모든 board에서 build하고 실행할 수 있습니다. Devicetree에 hardware watchdog이 정의되어 있으면 task watchdog의 fallback으로 사용하고, 없으면 task watchdog이 독립적으로 동작합니다.
ST Nucleo L073RZ용 빌드 및 실행
다음 command로 nucleo_l073rz용 sample을 build하고 flash합니다. 다른 board에서는 board 이름을 바꿉니다.
west build -b nucleo_l073rz samples/subsys/task_wdt
west flash
샘플 출력
Main thread는 계속 alive message를 출력하고 control thread가 시작됩니다. Control thread가 의도적으로 stuck 상태에 들어가 feed를 중단하면 task watchdog channel 1 callback이 control thread를 지목하고 device를 reset합니다. Reset 뒤 같은 sequence가 계속 반복됩니다.
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...
Source
출처
영어 원문에는 문단, 문서 지시문, 표, 코드, 코드 심벌, 경로를 그대로 보존했습니다.