Other Parts Discussed in Thread: CC2640R2F
Hi,
i am using SableX R2 on a custom board with CC2640R2 chip 5x5 on it. I am using the latest SDK_1_50_00_58.
I have noticed that once the watchdog has fired and reset was set to on, the device dont reset and stays in an unkown state.
I have also to disable reset and set a watchdog callback function to hard reset the software if its fired.
This function is never called even if i uncomment "watchdog_clear(...)". (debug/jtag not attached)
To make the watchdog fire the interrupt to go to the callback function, i have to add a "while(1){};" loop in my task.
Then i can see that every time it enters the callback function it turns the LED on and reset the controller.
But if i dont have the while loop, the function gets never called.
Any idea?
void iniWatchDog(void) { Watchdog_Params params; /* 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_OFF; //params.debugStallMode = Watchdog_DEBUG_STALL_ON; watchdogHandle = Watchdog_open(Board_WATCHDOG0, ¶ms); // if(watchdogHandle!=NULL) // Watchdog_setReload(watchdogHandle, Watchdog_convertMsToTicks(watchdogHandle,10000));//90000 mseconds } /* * ======== watchdogCallback ======== * Watchdog interrupt callback function. */ void watchdogCallback(uintptr_t unused) { /* Clear watchdog interrupt flag */ Watchdog_clear(watchdogHandle); /* Insert timeout handling code here. */ PIN_setOutputValue(hGpioPin,CC2640R2_LAUNCHXL_PIN_GLED,0); delay_ms(5000); //HAL_SYSTEM_RESET(); SysCtrlSystemReset() ; }