Part Number:CC2640R2F
Tool/software:TI-RTOS
Hi,
I wondere if you could help me with a recommandation:
I have set up a watchdog for keeping my system alive in unforeseen events.
But due to a variable sleep period, I need to turn off the watchdog at certain points. I do this like this in the watchdog callback:
if(watchdogisenabledflag){ system_reset(); } else{ Watchdog_clear(mywatchdog); }
Watchdog is handled in my custom task by the watchdogisenabled flag turned on and off. (hope you get my point).
My question is:
How can I implement this watchdog for the BLE code, is it enough to enable flag in the entry of the simple_peripheral task for(;;)-loop, like this:
static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) { // Initialize application SimpleBLEPeripheral_init(); // Application main loop for (;;) { watchdogisenabled = 1; //all code that is happening watchdogisenabled = 0; } }
1. Is this necessary? Is there a risk for the BLE code hanging up on an assert or exception?
2. Is there a way to make the watchdog counter sleep when the system goes to sleep?
other comments are welcome as well,
BTW: basing my software on the simple_peripheral_oad_offchip code with SDK 1.40
Best regards,
Viggo