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.

TMS320F28335: TMS320f28335 watchdog timer

Part Number: TMS320F28335


I am using tms320f28335 ,and i have activated it's watchdog timer ,

and actually i have write a test code for monitoring the behavior of device reset, I disable  the  clearing of watchdog timer  by activating a flag   intentionally ,and I monitor this by a Gpio X that  pulls down during the reset and is set when the device work normally and it's watchdog timer is reset cyclically,

i have measured the recovery time of the device by an oscillscope (I mean the time interval after reset untill my program is again run and set the GPIO X) The time is 10 ms and i think it is too long?

did any one know the recovery time of 28335? I need to decrease this interval but I don't know how?

please guide me

  • Hi,

    Time you have measured looks correct and it can not be reduced further.

    Vivek Singh
  • Please also note that this value depends on the frq of input clock you are providing. What is the input clock frq?

    Vivek Singh
  • The default watchdog reset frequency will be OSCCLK/(512 * 256), where OSCCLK is the input clock to the device (by virtue of either a quartz crystal or a “can” oscillator input to the XCLKIN pin). If you use a 30 MHz clock i/p, your reset frequency should be around 4.3 mS. You should be able to see this on an erased part. i.e. simply power-up a device with no code in flash and check the –XRS pin.
  • I am so sorry for delayed response,

    I have used external oscillator with 30 mhz frequency and I have set watchdog clock configuration equal to (oscclk/512/1) that oscclk frequency is 150mhz,immediately after reset I have called InitSysCtrl()
    Gpio_config()
    I have changed the watchdog clock configuration to (oscclk/512/256) but the time interval was again 10ms without any change!!
    In my application I need to inform, my watchdog reset occurrence to the other device through CANBUS as fast as I can and under 2ms, so I have decided enable the watchdog interrupt and sending the watchdog reset message with CAN BUS to other device then use immediate reset with these two line:
    SysCtrlRegs.SCSR=0x000;
    SysCtrlRegs.WDCR=0x38
    in the watchdog interrupt routine, then I could be not afraid about the time interval of watchdog reset, is my decision true? Or you have better idea?
  • WDCR register is EALLOW protected. Did you verify if EALLOW is active and your write to WDCR went through?

     

    OSCCLK frequency is fixed at 30 MHz and does not change, even if SYSCLKOUT is different. Note that there is a 8-bit counter after the WD prescaler, so that introduces another /256.

     

    Are you running the code from RAM or flash? I suggest you flash the code , run it without the JTAG connected and simply monitor the -XRS pin to determine the WD time-out period. First start with an erased part (i.e. a part with no code in flash). If you apply power, you should see the XRS pin pulsing every 4.3 mS. You can then program your code in flash with the new WDCR:WDPS value and verify if the time-out period changes.

     

    You say "....In my application I need to inform, my watchdog reset occurrence to the other device through CANBUS as fast as I can and under 2ms....". I don’t understand the concern here, since you are doing this after the WD counter has overflowed and 2 mS is more than enough time to do this on the CAN bus. Of course, this depends on what else is happening on the CAN bus.