Files
DCU_APP/GD32E508_DCU_APP/device/watchdog.h
T

23 lines
566 B
C++
Raw Normal View History

2026-07-15 02:49:37 +08:00
/**
* @file watchdog.h
* @brief APP 独立看门狗模块(FWDGT)。
*
* 超时后系统硬复位,BOOT 检测 FWDGT 复位标志后停留在 OTA 等待模式,
* 而非继续跳入卡死的 APP。
*/
#ifndef DEVICE_WATCHDOG_H
#define DEVICE_WATCHDOG_H
#include <stdint.h>
class Watchdog {
public:
/** @brief 初始化并启动 FWDGT,超时约 CONFIG_FWDGT_TIMEOUT_MS 毫秒。 */
static void init();
/** @brief 喂狗(重载计数器),应在主循环中周期调用。 */
static void feed();
};
#endif /* DEVICE_WATCHDOG_H */