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.

C5535 ezdsp watchdog timer work unstable

Hello,

I am working with DSP C55x and CCSv5.2 to test WDT, and I faced a problem about WDT.

I use CSL function to do watchdog reboot action.

Sometimes the example works success,

but sometimes it can't reboot when WDSVR countdown reach 0.

Do I missing anything? or any suggestions to solve this abnormal behavior?

Here is my example.

Void Enable_WDT()
{
/* Watchdog timer Object structure */
CSL_WdtObj wdtObj;

CSL_Status status;
CSL_WdtHandle hWdt = NULL;
WDTIM_Config hwConfig;
Uint16 counter;

/* Open the WDTIM module */
hWdt = (CSL_WdtObj *)WDTIM_open(WDT_INST_0, &wdtObj, &status);
if(NULL == hWdt)
{
return (CSL_TEST_FAILED);
}

hwConfig.counter = 0xFFFF;
hwConfig.prescale = 0x0FFF;

/* Configure the watch dog timer */
status = WDTIM_config(hWdt, &hwConfig);
if(CSL_SOK != status)
{
return (CSL_TEST_FAILED);
}

/* Start the watch dog timer */
status = WDTIM_start(hWdt);
if(CSL_SOK != status)
{
return (CSL_TEST_FAILED);
}
return (CSL_TEST_PASSED);
}

  • Hi,

      Did you try looking at the Watch Dog Timer example in CSL 3.04 - SPRC133.

      Below is the details of what example does. You could refer or use the example for your application.

    This example code configures the CSL WDT module and start the timer. Timer is serviced for 256 times to verify whether the timer is running  properly. Each time the timer is serviced the timer counter should be reset
     and timer should re-start the counting. Timer count is read and displayed on the CCS "Stdout" window after servicing the counter. After servicing the counter for 256 times test code will stop servicing the  timer and keeps reading and displaying the timer count. Timer count will  go on decreasing and CPU will be reset when timer count reaches to zero. After CPU reset test code stops running and target will be disconnected.

    Hope the above information helps.

    Regards

     Vasanth

  • Hi, 

    Thanks for your kindly reply, but I knew the examples.

    I already tried WDT example in CSL 3.04 and got the same result.

    And I didn't see any obvious modifications between CSL 3.04 and previous version. 

    It seems just have different prescale in CSL 3.04. And My test program already use the same prescale value.

    If I miss any useful information, please tell me, thanks.

    My problem is WDT work unstable. 

    I write an auto test program to do WDT reboot about 100 times.

    It reboot 80 times, but stop rebooting when WDSVR countdown reach 0 at the next times.

    And retry the same program many times. It always can't 100 percent finish WDT reboot test.

    Does any other timer or settings may cauesd WDT work failed ?

    Regrads,

    Will