I am using the watchdog timer on TM4C129ENCPDT processor.
I have now had two occasions where after I did a test of the watchdog (Just wait till it reset the processor) the processor doesn't reset.
Not only that but it ignores the reset pin on start up as well.
I can get the processor to run again using CCSV6 to reload a program and run it through the JTAG.
However once I power the board down it will not power up again of its own accord, I once again have to use the JTAG interface to get the processor to run.
It is as though the execution of the watchdog interrupt has disabled something internal which causes reset to no longer work.
Here is my code to create the watchdog in the first place and also the callback function.
In order to test the watchdog all I do is set my ResetActivated flag and then wait for 10 seconds.
The watchdog should hit after 1 second, if it doesn't I will report an error after the 10 seconds and clear the flag.
This routine never exits, the processor just seems to shutdown and I cannot get it to run again without using the JTAG.
I am certain I have had this working without issue on previous TM4C129ENCPDT devices but these latest ones both failed the same way!
// Create and enable a Watchdog with resets enabled
Watchdog_Params_init(&wdogParams);
wdogParams.callbackFxn = Watchdog_CallbackFn;
wdogParams.resetMode = Watchdog_RESET_ON;
watchdog = Watchdog_open(0, &wdogParams);
if (watchdog == NULL)
{
System_abort("Error opening Watchdog!\n");
}
// ===========================================================
// ======== Watchdog_CallbackFn ========
// Watchdog interrupt callback function.
// It clears the watchdog interrupt flag.
// ===========================================================
Void Watchdog_CallbackFn(UArg handle)
{
if (!ResetActivated)
Watchdog_clear((Watchdog_Handle)handle); // hit the watchdog if we don't want reset
}
This is all running under tirtos_tivac_2_14_00_10