Part Number: TM4C1294KCPDT
Hi,
In my coustom board using TM4C1294KCPDT controller , in that i need to enable watchdog timer for my application. I am following TI Example Watchdog timer code ,interrupt is generating every one second once. Problem is when i am pusing the variable g_bFeedWatchdog as "Zero" Controller doesn't get reset instead of that its show " Device is locked up in Hardware fault" . Below i have attached fault screenshot as well as code for your refernce . Please let me know if did any mistake in coding ?

Regards,
Rani
volatile bool g_bFeedWatchdog = true;
void
WatchdogIntHandler(void)
{
//
// If we have been told to stop feeding the watchdog, return immediately
// without clearing the interrupt. This will cause the system to reset
// next time the watchdog interrupt fires.
//
if(!g_bFeedWatchdog)
{
return;
}
//
// Clear the watchdog interrupt.
//
MAP_WatchdogIntClear(WATCHDOG0_BASE);
//
// Invert the GPIO PN0 value.
//
}
void watch_dog()
{
//
// Enable the peripherals used by this example.
//
MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_WDOG0);
MAP_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPION);
//
// Enable processor interrupts.
//
MAP_IntMasterEnable();
//
// Set GPIO PN0 as an output. This drives an LED on the board that will
// toggle when a watchdog interrupt is processed.
//
MAP_GPIOPinTypeGPIOOutput(GPIO_PORTN_BASE, GPIO_PIN_0);
MAP_GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_0, 0);
//
// Enable the watchdog interrupt.
//
MAP_IntEnable(INT_WATCHDOG);
//
// Set the period of the watchdog timer to 1 second.
//
MAP_WatchdogReloadSet(WATCHDOG0_BASE, (g_ui32SysClock));
//
// Enable reset generation from the watchdog timer.
//
MAP_WatchdogResetEnable(WATCHDOG0_BASE);
//
// Enable the watchdog timer.
//
MAP_WatchdogEnable(WATCHDOG0_BASE);
}
