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: TMS570LS3137 Watchdog Timer Expire Reset

Part Number: TMS570LS3137
Other Parts Discussed in Thread: HALCOGEN

In a related thread, the application engineer seems to be saying that the Digital Windowed Watchdog Reaction Control (RTIWWDRXNCTRL) register specifies the reaction of the DWD when the DWD counter is decremented to zero as well as the reaction of the DWWD if the watchdog is serviced outside the time window. Am I reading this correctly?

Hugh

  • Hi Hugh,

    You are right. As I mentioned in another thread, please don't service the dog (write key to WDKEY register) before the watchdog window is opened up. Otherwise, it will reset the device.
  • QJ,

    I understand. I've configured my WDT for a window size of 100% using this HALCoGen API:

    dwwdInit(Generate_Reset, 218, Size_100_Percent);

    However, I'm still observing occasional system resets due to the WDT system. (If I disable the WDT system, the resets don't occur.) When I read the RTIWDSTATUS register after these resets I see the value 0x00000032 or 0x0000003A, which seems to indicate a window violation. Why might this be happening if I specified a 100% window size?

    Hugh
  • Hi Hugh,

    The correct sequence is:
    1. configure preload, window size, reaction
    2. enable DWD (RTIDWDCTRL)
    3. service the DWD (RTIWDKEY)

    If you service the dog before step #2, it will trigger the reset.
  • Yes, I'm following the sequence you specify.

  • Hello Hugh,

    You said "If I disable the WDT system, the resets don't occur." Did you disable the WDT by writing a wrong password(5312 ACEDh) to RTIDWDCTRL to disable the DWD?

    Can you share your code with us? Thanks
  • When I say "disable the WDT system" I mean don't initialize the WDT following a reset and don't write to the WDKEY register at any time during program execution. I fear my previous remark in this regard has distracted us from the central issue...

    My point of confusion concerns the values that I'm seeing in the RTIWDSTATUS register following a reset generated by the WDT. In spite of the fact that I've specified a 100% window size, the register is indicating that a time-window violation has occurred (bit 5) and some combination of end time violation (bit 4) or start time violation (bit 3). Are these indications what you would expect in the case where the DWWD feature isn't enabled?

    It would be difficult to share my code in its current form. I'd have to create a stripped-down version of my software

  • Hello Hugh,

    I understand that servicing the dog before the DWD counter is enabled should not reset the device. 

    I did many test using the following code, but did not generate reset. 

    i=1;
    /* Initialize and start DWD */
    dwwdInit(Generate_Reset, 4095, Size_100_Percent);
    dwdCounterEnable();
    while(1){
         if(i==1){
               dwdReset();
         }
    }

     

  • Hugh,

    A 100% window size means that the watchdog service window is always open. So it is essentially a timeout watchdog, once enabled. What is the frequency of the RTI1CLK domain? If it is 90MHz, then you are allowing for only 2.433 us (219 / 90MHz) before the watchdog generates a reset.

    Is this the timeout period you desire?

    Regards,
    Sunil
  • 219*2^13/90Mhz = 19.7ms
  • Of course, thanks QJ. Sorry for the confusion on my part.
  • @Sunil: The 100% window behavior you describe is also how I understand the system to work.

    @QJ: I concur with your calculation. I'm looking for a timeout period of approximately 20 msec.

  • Hello Hugh,

    I did many (>10000) test using following code, and did not get the reset issue:

    i=1;
    dwwdInit(Generate_Reset, 4095, Size_100_Percent);
    dwdCounterEnable();

    while(1){
    if(i != 0){
    dwdReset(); //feed the dog after the counter is enabled
    i++;
    }
    }

    1. configure the reaction, preload, window size
    2. enable the counter
    3. service the dog