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.

AWR1642: How to set the watchdog configurations exactly on DSS ?

Part Number: AWR1642

Hi,

I would like to implement the watchdog feature on DSS.

I also reference the sample code  in the watchdog driver folder.

When watchdogInit() is initialized, the watchdogCallback() start to work.

My question is that why watchdogCallback() is working, it triggers the ESM ? 

And then, the softreset is triggered.

Is there any other configurations missing on DSS ?

Thanks

- Kris

Implementation:

====================================================================

On DSS:

static void watchdogCallback(Watchdog_Handle handle)
{
    gWatchdogInt++;
    if (gWatchdogInt > 200)
    {
        System_printf ("Debug: Application - Watchdog Driver callback for NMI received\n");
        //DebugP_assert(0);
    }
    return;
}
static int32_t watchdogInit(void)
{
    Watchdog_Params     watchdogParams;

    /* Initializa the Watchdog driver */
    Watchdog_init();

    /* Initialize the Watchdog driver default parameters */
    Watchdog_Params_init(&watchdogParams);

    watchdogParams.resetMode = Watchdog_RESET_OFF;
    watchdogParams.callbackFxn = watchdogCallback;
    watchdogParams.debugStallMode = Watchdog_DEBUG_STALL_OFF;
    watchdogParams.windowSize = Watchdog_WINDOW_100_PERCENT;
    /* T-expire = (preloadValue+1) x 2 ^ 13 / RTICLK1 ; preloadValue=0~4095 ; RTICLK1=200MHz */
    watchdogParams.preloadValue = 4095; //150ms
    watchdogParams.socHandle = gMmwDssMCB.socHandle;
    watchdogParams.esmHandle = esmHandle;

    /* Open the Watchdog driver */
    watchdogHandle = Watchdog_open(0, &watchdogParams);
    if (watchdogHandle == NULL)
    {
        System_printf ("Error: Watchdog Driver Open failed\n");
        return -1;
    }

    return 0;
}

On MSS:

static void DSPNotifyMSSCallback(void* arg)
{
    gWatchdogDspInt++;
    CLI_write ("\n\rsoft reset (%d)\n\r", gWatchdogDspInt);

    SoftSysReset();

    return;
}

====================================================================