This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC26xx Wachdog Timer (seRetload function), sync trigger time in sleep(idle or standby) mode



I have used watchdog function and wanted to kick watchdog using a normal timer, every 5 seconds.

The timer of watchdog is set 10 sec by using setReload(). and my device uses power saving .

But the watchdog does not trigger after 10 sec, when a value of ReloadGet() and current value is compared. (refer Log_warning2)

So, i guess that watchdog timer is delayed in sleep mode, because the clock source of MCU is changed 48Mhz to 32Khz .

How can the watchdog be exactly triggered after 10 sec, when a system uses power saving mode.




//in board.c file /* * ========================== Watchdog begin ======================================= * */ #include <ti/drivers/Watchdog.h> #include <ti/drivers/watchdog/WatchdogCC26XX.h> WatchdogCC26XX_Object watchdogCC26XXObjects[CC2650_WATCHDOGCOUNT]; const WatchdogCC26XX_HWAttrs watchdogCC26XXHwAttrs[] = { { .baseAddr = WDT_BASE, .intNum = INT_WATCHDOG, } }; const Watchdog_Config Watchdog_config[] = { { &WatchdogCC26XX_fxnTable, &watchdogCC26XXObjects[0], &watchdogCC26XXHwAttrs[0] }, { NULL, NULL, NULL }, }; /* * ========================== Watchdog end ========================================= */ //............ //in task.c file #include <ti/drivers/Watchdog.h> #include <ti/drivers/watchdog/WatchdogCC26XX.h> #include<driverlib/watchdog.h> Clock_Struct watchdogKickTimer; Watchdog_Handle hWDT; void watchdogKickHandler(UArg arg) { Log_warning2("%d, %d", WatchdogReloadGet(), WatchdogValueGet()); Watchdog_clear(hWDT); } //... void someTask() { Watchdog_Params wp; Watchdog_Params_init(&wp); wp.callbackFxn = NULL; wp.debugStallMode = Watchdog_DEBUG_STALL_ON; wp.resetMode = Watchdog_RESET_ON; hWDT = Watchdog_open(CC2650_WATCHDOG0, &wp); Watchdog_setReload(hWDT, 10*1500000); // 10sec (WDT runs always at 48MHz/32) Util_constructClock(&watchdogKickTimer, watchdogKickHandler,5*1000, 5*1000, true, NULL) //kick watchdog, every 5 second }

  • Hi,

    The watchdog will only count while the device is active/idle (=not in Standby) as the clock is gated to the MCU domain during Standby. While in Standby the device does not have any WDT mechanisms available.

    Can you try disable power_saving and see if WDT triggers?
  • Hi.

    Thank you for your answer.

    If the Power_Saving mode is disable, the working of WDT trigger is good,.
    i use following codes.

    /* Set constraints for Standby mode */
    Power_setConstraint(Power_SB_DISALLOW);

    i will refer to this information, when i use an applicatiion using bluetooth stack, which uses priodical standby mode for power saving.