![]() |
LPCOpen Platform
LPCOpen Platform for NXP LPC Microcontrollers
|
Functions | |
static | wdt_handle (void) |
void | EVRT_IRQHandler (void) |
Event router Interrupt Handler. | |
void | WDT_IRQHandler (void) |
watchdog timer Interrupt Handler | |
void | SysTick_Handler (void) |
SysTick Interrupt Handler. | |
int | main (void) |
Main entry point. | |
Variables | |
static volatile int | wdtFeedState |
static volatile bool | On = false |
static volatile bool | On1 = false |
This example shows how to use Windowed watchdog timer to generate interrupts to manage the watchdog timer. If the watchdog timer isn't 'fed' within it's window time, it will reset the device. The LED will toggle states on each watchdog feed event. You can also use a terminal program with the UART to select the feed event. If the feed is disabled, the chip will reset.
No special setup is required for the demo. Just build and run. NGX Xplorer users (no UART) should modify the code to test the different watchdog events.
The example works in one of 4 ways. If '1' is selected, WDT is fed by the sysTick at 20Hz and should never time out (fast LED). If '2' is selcted, the WDT is fed by the watchdog window interrupt (slow LED). If '3' is selected, the watchdog times out and resets the device. If '4' is selected, the interrupt for the WDT timeout events are routed via the event router handler instead of the watchdog interrupt handler.
Build procedure: LPCOpen 18xx/43xx build instructions
Supported boards and board setup:
Submit bug reports for LPCOpen code here.
void EVRT_IRQHandler | ( | void | ) |
Event router Interrupt Handler.
Definition at line 118 of file watchdog.c.
int main | ( | void | ) |
void SysTick_Handler | ( | void | ) |
SysTick Interrupt Handler.
Definition at line 144 of file watchdog.c.
|
static |
Definition at line 81 of file watchdog.c.
void WDT_IRQHandler | ( | void | ) |
watchdog timer Interrupt Handler
Definition at line 134 of file watchdog.c.
|
static |
Definition at line 70 of file watchdog.c.
|
static |
Definition at line 70 of file watchdog.c.
|
static |
Definition at line 69 of file watchdog.c.