Tuyaos/watchdog

TuyaOS watchdog via tal_watchdog (demo: os_watchdog). 看门狗、喂狗、tal_watchdog、防死机。

tuya Updated

File contents

TuyaOS Watchdog (tal_watchdog)

Demo: …/examples/os_watchdog/example_os_watchdog.c

TuyaOS examples use tal_watchdog_*, not the TuyaOpen tkl_watchdog_* card.

Pattern

#include "tal_watchdog.h"
#include "tal_log.h"

void example_feed_watchdog(void)
{
    OPERATE_RET rt = tal_watchdog_refresh();
    if (rt != OPRT_OK) {
        TAL_PR_ERR("watchdog refresh failed %d", rt);
    }
}

Notes

  • Init/start APIs may already run in system bring-up — read the full demo and platform docs before adding a second init.
  • Feed from a healthy path only (main loop / dedicated thread), never from a path that can hang while still feeding.

tuya/tuyaopen-ide-manifests/tree/main/skills/embedded/tuyaos-hardware-vibe-coding/peripheral-drivers/watchdog commit 210f8dd614

Frequently asked questions

npx skillmds@latest add tuya/tuyaos-watchdog