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.

CCS/CC2652P: Why SysCtrlSystemReset() doesn't work in watchdog's callback?

Part Number: CC2652P


Tool/software: Code Composer Studio

Hi, I use CC2652P. I have a question about watchdog.

Here is my code:

void watchdogCallback(uintptr_t watchdogHandle)
{
    /*
     * If the Watchdog Non-Maskable Interrupt (NMI) is called,
     * loop until the device resets. Some devices will invoke
     * this callback upon watchdog expiration while others will
     * reset. See the device specific watchdog driver documentation
     * for your device.
     */

    printf("watchdogCallback!\n");

    //HWREG(WDT_BASE + WDT_O_ICR) = 0xFFFFFFFF;

    SysCtrlSystemReset();

}

void watchdog_init(void)
{
    Watchdog_Params params;

    Watchdog_init();

    Watchdog_Params_init(&params);
    params.callbackFxn = (Watchdog_Callback) watchdogCallback;
    params.debugStallMode = Watchdog_DEBUG_STALL_ON;
    params.resetMode = Watchdog_RESET_ON;

    Watchdog_open(CONFIG_WATCHDOG_0, &params);
}

When enters watchdog callback, I want to reset the target immediately. So I use SysCtrlSystemReset() in callback. But CPU just stops in SysCtrlSystemReset(), and keeps until another watchdog period to trigger a warm reset.

In my application code, SysCtrlSystemReset() works fine.

So, my question is why SysCtrlSystemReset() doesn't work in watchdog callback?

Are there any other cases where SysCtrlSystemReset() dosen't work?