Watchdog_Handle whandle;
void Init_ Watchdog(void)
{
Watchdog_Params params;
uint32_t tickValue;
Watchdog_init();
Watchdog_Params_init(¶ms);
params.callbackFxn = watchdogCallback;
whandle = Watchdog_open(0, ¶ms);
tickValue = Watchdog_convertMsToTicks(whandle, 2500);
Watchdog_setReload(whandle, tickValue);
}
void watchdogCallback(uintptr_t handle)
{
Watchdog_clear(whandle);
}
我是按照上面配置看门狗的, 用while(1);卡死测试, 但是没有复位, 这样配置看门狗有问题吗?
Viki Shi:
请参考官方的看门狗例程:dev.ti.com/…/node