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.

TMS320F28069: Clear definition of the linked behaviour of WDFLAG, CLOCKFAIL and the XRS pin

Part Number: TMS320F28069

Hello,

I have a board with a TMS320F28069 MCU, and the following circuit for the XRS and Crystal pins.
Note the intention to conform to http://processors.wiki.ti.com/index.php/WDFlag_on_Piccolo section 2B).

I am able to distinguish between watchdog, clock faillure and power on:
Watchdog triggers WDFLAG
Clock faillure triggers CLOCKFAIL
PowerOn triggers none of those two.

However, from the above linked article:
When the XRS line is pulled low, the WDFLAG bit is forced low. The WDFLAG bit will only be set if the XRS signal is sampled high after a delay of 8192 * 4 + 512 OSCLK cycles. If the XRS signal is sampled low at this time, then the WDFLAG bit will remain at 0. Therefore to distinguish between a watchdog reset and an external device reset, an external reset must be longer in duration then this sampling time.

Hence my expectation:
XRS pin Low yield WDFLAG = 0.
XRS pin High yield WDFLAG = 1, making it more of a "cold/hot reset differentiator".

What I observe is not that. Shorting the clock capacitors, causing a restart by the NMI, will reset the device with XRS pin high, without any observable glitch on the testpoint of my circuit... XRS pin IS HIGH at the ~3.7ms delay, but WDFLAG is still low.

Also, I wanted to validate our firmware for watchdog handling, and simply tied XRS to a 3.3V source BEFORE power-on of the main circuitry. WDFLAG stayed low.

===

Can you please clarify all the requirement to have a set WDFLAG???
"The WDFLAG bit will only be set if the XRS signal is sampled high[...]" seems to be only half of the story.
Does it need to be triggered by the watchdog AND will be cleared automatically if XRS pin is low after 3.7ms?
I have observed CLOCKFAIL to be kept in memory after a reset... Could WDFLAG have a similar behaviour? Is there a list of other registers that are persistent after device reset?

Thanks!

  • Hi Jerome,

    Please look at this thread.

    https://e2e.ti.com/support/microcontrollers/c2000/f/171/t/753473

    His question is similar to yours. Let us know if that still doesn't clear it up.

  • Thanks, It does clear things up!

    From the pointed thread:
    ===
    Need to clarify a few things: A BOR reset is not a watchdog reset. Yes they are both connected to XRSn and they will drive XRSn low when either condition happens. However, they are not the same. I'll try to explain my understanding of things.

    A watchdog reset (WDRSTn) happens when the WDCNTR overflows before being cleared. When this overflow happens, WDRSTn will be driven low which will also drive XRSn low for 512 OSCCLK (51.2us). WDFLAG will be set after this. WDFLAG is only set by the rising edge of WDRSTn. In this case, WDRSTn transitions from low to high so will set WDFLAG.

    A BOR reset happens when VDDIO voltage falls into the BOR trip range. When this trip happens, XRSn will be forced low. XRSn will return back to high 400-800us later after VDDIO moves out of the BOR trip range. Note that in this case, WDRSTn was never forced low so there was no low to high transition that happened to set WDFLAG.
    ===
  • Glad that cleared it up. Let us know if you have anymore questions.