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;
}
//
// After 10 interrupts, switch On LED6 to indicate system reset
// and don't clear watchdog interrupt which causes system reset
//
if(g_ulWatchdogCycles >= 10)
{
GPIO_IF_LedOn(MCU_RED_LED_GPIO);
MAP_UtilsDelay(800000);
return;
}
//
// Clear the watchdog interrupt.
//
MAP_WatchdogIntClear(WDT_BASE);
GPIO_IF_LedOn(MCU_RED_LED_GPIO);
MAP_UtilsDelay(800000);
GPIO_IF_LedOff(MCU_RED_LED_GPIO);
//
// Increment our interrupt counter.
//
g_ulWatchdogCycles++;
感谢分享