Tool/software: TI-RTOS
Hello,
My development environment is as follows:
SDK version: simplelink_cc2640r2_sdk_1_35_00_33
IC: CC2640R2FRGZ
Enable watchdog in SimpleBLEPeripheral_init(),
Kick watchdog in SimpleBLEPeripheral_taskFxn(),
The code is as follows.
static void SimpleBLEPeripheral_init(void) { // ****************************************************************** // N0 STACK API CALLS CAN OCCUR BEFORE THIS CALL TO ICall_registerApp // ****************************************************************** // Register the current thread as an ICall dispatcher application // so that the application can send and receive messages. ICall_registerApp(&selfEntity, &syncEvent); ... Board_initWatchdog(); Watchdog_Params_init(¶ms); params.resetMode = Watchdog_RESET_ON; // params.callbackFxn = UserCallbackFxn; hWdt = Watchdog_open(Board_WATCHDOG0, ¶ms); if (hWdt == NULL) { // Error opening watchdog for (;;){} } ... } /********************************************************************* * @fn SimpleBLEPeripheral_taskFxn * * @brief Application task entry point for the Simple BLE Peripheral. * * @param a0, a1 - not used. * * @return None. */ static void SimpleBLEPeripheral_taskFxn(UArg a0, UArg a1) { // Initialize application SimpleBLEPeripheral_init(); // Application main loop for (;;) { uint32_t events; // Waits for an event to be posted associated with the calling thread. // Note that an event associated with a thread is posted when a // message is queued to the message receive queue of the thread events = Event_pend(syncEvent, Event_Id_NONE, SBP_ALL_EVENTS, ICALL_TIMEOUT_FOREVER); Watchdog_clear(hWdt); ... } }
When the system only do the Bluetooth broadcast,
and other timer related things are in standby,
In this time the system will enter sleep mode and the watchdog should also go to sleep.
Q1: When the system is going to perform Bluetooth broadcast, will it leave sleep mode briefly and let the watchdog wake up briefly?
Q2: If so, how do you feed the dog during this time to avoid a system reboot for a long time?