//***************************************************************************** // // The interrupt handler for the watchdog. This feeds the dog (so that the // processor does not get reset) and winks the LED connected to GPIO B3. // //***************************************************************************** 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. // ROM_WatchdogIntClear(WATCHDOG0_BASE); // // Invert the GPIO PN0 value. // ROM_GPIOPinWrite(GPIO_PORTN_BASE, GPIO_PIN_0, (ROM_GPIOPinRead(GPIO_PORTN_BASE, GPIO_PIN_0) ^ GPIO_PIN_0)); }
//***************************************************************************** // // This function is called when the watchdog timer expires, which indicates // that the input signal has been lost. // //***************************************************************************** void WatchdogIntHandler(void) { // // Clear the watchdog interrupt. // ROM_WatchdogIntClear(WATCHDOG0_BASE); // // Indicate that there is no longer an input signal. // ControllerLinkLost(LINK_TYPE_NONE); }
//***************************************************************************** // // The interrupt handler for the watchdog. This feeds the dog (so that the // processor does not get reset) and winks the LED. // //***************************************************************************** void WatchdogIntHandler(void) { // // Clear the watchdog interrupt. // ROM_WatchdogIntClear(WATCHDOG0_BASE); // // Invert the GPIO D0 value. // ROM_GPIOPinWrite(GPIO_PORTD_BASE, GPIO_PIN_0, ROM_GPIOPinRead(GPIO_PORTD_BASE, GPIO_PIN_0) ^ GPIO_PIN_0); }
//***************************************************************************** // // The interrupt handler for the watchdog. This feeds the dog (so that the // processor does not get reset) and winks the corresponding LED. // //***************************************************************************** void WatchdogIntHandler(void) { char pcBuf[8]; // // See if watchdog 0 generated an interrupt. // if(ROM_WatchdogIntStatus(WATCHDOG0_BASE, true)) { // // 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_bFeedWatchdog0) { // // Clear the watchdog interrupt. // ROM_WatchdogIntClear(WATCHDOG0_BASE); // // Increment the counter and display it on the screen. // g_ui8CounterWatchdog0++; GrContextFontSet(&g_sContext, g_psFontCmss20); usprintf(pcBuf, " %03d ", g_ui8CounterWatchdog0); GrStringDrawCentered(&g_sContext, pcBuf, -1, 80, 100, 1); // // Invert the GREEN LED value. // ROM_GPIOPinWrite(LED_GREEN_GPIO_PORTBASE, LED_GREEN_GPIO_PIN, (ROM_GPIOPinRead(LED_GREEN_GPIO_PORTBASE, LED_GREEN_GPIO_PIN) ^ LED_GREEN_GPIO_PIN)); } } // // See if watchdog 1 generated an interrupt. // if(ROM_WatchdogIntStatus(WATCHDOG1_BASE, true)) { // // 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_bFeedWatchdog1) { // // Clear the watchdog interrupt. // ROM_WatchdogIntClear(WATCHDOG1_BASE); // // Increment the counter and display it on the screen. // g_ui8CounterWatchdog1++; GrContextFontSet(&g_sContext, g_psFontCmss20); usprintf(pcBuf, " %03d ", g_ui8CounterWatchdog1); GrStringDrawCentered(&g_sContext, pcBuf, -1, 240, 100, 1); // // Invert the AMBER LED value. // ROM_GPIOPinWrite(LED_AMBER_GPIO_PORTBASE, LED_AMBER_GPIO_PIN, (ROM_GPIOPinRead(LED_AMBER_GPIO_PORTBASE, LED_AMBER_GPIO_PIN) ^ LED_AMBER_GPIO_PIN)); } } }