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.

TMS570LS3137: Call to dwdReset() prior to dwdInit() causes processor to reset

Part Number: TMS570LS3137

I've discovered that a call to dwdReset() before configuring the watchdog timer via calls to dwdInit() and dwdCounterEnable() causes a processor reset. Why is this and is there anything I can to do prevent the reset?

  • Hello Hugh,

    For digital windowed watchdog, any attempt to service the watchdog outside the time window, or failure to service the watchdog in the time window, will cause the watchdog to generate a reset or NMI to the CPU. The default value of watchdog reaction register is CPU reset (0x5). If you write key to WDKEY register before the watchdog window is open up (or DWD counter is enabled), you will get start-time window violation which causes CPU reset (default).

  • Hi QT,

    Thanks for bringing the windowed watchdog behavior to my attention. However, since I'm not using this feature, the mystery remains. It would appear that this is just how the WDT behaves and so one has to avoid writing the key sequence when the DWD counter isn't enabled. Fortunately, we can determine if the counter is disabled by reading the DWD control register, i.e.

    if(0x5312ACED == rtiREG1->DWDCTRL)

    {

     // don't write the key sequence

    }


    When I do this, all is well.

  • Hi Hugh,

    You are right. This is the way to avoid the problem.