Tool/software: TI-RTOS
I wan to add watchdog to reset CC2630 chip when software and hardware error. I have product with hanging issue and could not be fix.
I follow this post
with tirtos_cc13xx_cc26xx_2_21_00_06 driver lib. I put below code to main.c
Watchdog_Handle hWDT;
void wdtCallback(UArg a0) {
Watchdog_clear(hWDT);
}
void wdtInitFxn() {
Watchdog_Params wp;
Watchdog_Params_init(&wp);
wp.callbackFxn = wdtCallback;
wp.debugStallMode = Watchdog_DEBUG_STALL_ON;
wp.resetMode = Watchdog_RESET_ON;
hWDT = Watchdog_open(Board_WATCHDOG0, &wp);
if (hWDT == NULL) {
/* Error opening Watchdog */
while (1);
}
Watchdog_setReload(hWDT, Watchdog_convertMsToTicks(hWDT, 10000)); // 2*1500000 1sec (WDT runs always at 48MHz/32)
}
I call wdtInitFxn() in Switch_initialization(void) of switch.c
The watchdog work, i put break point on Watchdog_clear(hWDT) it will call after 10 seconds, but the program only work for 10 seconds before Watchdog_clear, seem the task of the Zigbee application not call after that.
Anyone can help me to solve the problem?