static void watchdog_timer_Callback(UArg arg)
{
Watchdog_setReload(watchdogHandle, 1500000*2);
Util_startClock(&periodicClock);
}
void app_watchdog_init(void)
{
/* Call board init functions */
Watchdog_init();
/* Create and enable a Watchdog with resets disabled */
Watchdog_Params_init(¶ms);
params.callbackFxn = (Watchdog_Callback)watchdogCallback;
params.resetMode = Watchdog_RESET_ON;
watchdogHandle = Watchdog_open(Board_WATCHDOG0, ¶ms);
Watchdog_setReload(watchdogHandle, 1500000*2);
Util_constructClock(&periodicClock, watchdog_timer_Callback,
1000, 1000, false, 0);
Util_startClock(&periodicClock);
}
蓝牙死掉了,按键中断也没反应了,确认是死机,但是看门狗却没有重启,没有插着仿真器,可以正常复位的状态
Susan Yang:
建议您参考SDK内给出的watchdog驱动程序
C:\ti\simplelink_cc2640r2_sdk_1_50_00_58\examples\rtos\CC2640R2_LAUNCHXL\drivers\watchdog