Other Parts Discussed in Thread: TMS320F28335, TMS320F2812
Hi
I'm using a TMS320F28335 and need to use the Watchdog Reset flag (SysCtrlRegs.WDCR & 0x0080) to detect if the there was a normal power up or a watchdog reset event. The circuit is built according to TI reference design for this chip. I'm using the TI headers and example c files as a basis.
// on initializing of system before entering 'main':
lastResetWatchdog = 0;
if(SysCtrlRegs.WDCR & 0x0080)
{
SysCtrlRegs.WDCR |= 0x0080; // clear watchdog flag
lastResetWatchdog = 1;
}
I find that if the reset was due to a watchdog reset the WDFLAG flag is always set, however if there was a normal power up event this flag is in a random state. This causes the system to detect a watchdog reset even if it was a normal power up.
Previously I have used the TMS320F2812 chip, but according to the errata it is not able to accurately detect a watchdog reset. The detection is a critical part of the design and thus the system was upgraded to the TMS320F28335 which seems to have no limitations according to the latest errata on the watchdog reset detection.
Could I be missing something? Please assist.