CC2640R2F 看门狗配置后什么异常才会导致看门狗复位?
如果在程序中使用while(1);卡死程序会导致看门狗复位吗?
Viki Shi:
会,只要在死循环里出不来,无法喂狗,就会复位
WK C:
回复 Viki Shi:
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);卡死测试, 但是没有复位, 这样配置看门狗有问题吗?