I have seen posts whereby the watchdog clear timer is setup to run periodically, when implementing this the bluetooth no longer functions within Simple Peripheral project, I try to setup the watchdog to basically run forever but anything larger than 30 minutes causes the debugger to lose connection when setting up watchdog reload, I basically want the watchdog to run forever, I have tested this with a while(1) and it triggers the call back and soft reset, however not when attached to the debugger as I have seen previously mentioned JTAG on CCS causes issues, but externally to this it functions.
void WatchdogInit(void) { uint32_t tickValue = 0; Watchdog_Handle handle; Watchdog_Params params; Board_initWatchdog(); //create watchdog Watchdog_Params_init(¶ms); params.callbackFxn = (Watchdog_Callback) watchdogCallback; params.resetMode = Watchdog_RESET_ON; //open watchdog handle = Watchdog_open(Board_WATCHDOG0, ¶ms); Watchdog_clear(handle); if (handle == NULL) { /* Error opening Watchdog */ SystemResetSoft(); // reset the system to run again } else { // set timeout period to 240 hours tickValue = Watchdog_convertMsToTicks(handle, 1000000); Watchdog_setReload(handle, tickValue); setWhiteLedPin(1); // white LED means Watchdog is running } } void watchdogCallback(uintptr_t watchdogHandle) { SystemResetSoft(); // reset the system to run again }
ccs 12.2.0