| LPCOpen Platform v1.03 LPCOpen Platform for NXP LPC Microcontrollers

- Main Page
- Modules
- Data Structures
- Files
- Related Pages

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
LPC13xx Watchdog timer example
Peripheral examples

## Detailed Description

Example description
This example shows how to use WWDT(Windowed Watchdog Timer)/WDT(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. If the feed is disabled, the chip will reset.

The example works in one of 2 ways. For WWDT, the default way is to feed the watchdog faster than it's warning interval. This is the normal operation of the watchdog. The 2nd way of WWDT lets the watchdog generate a warning and then feeds the watchdog timer on the warning (the LED will toggle on each warning interval cycle). For WDT, the default way is to feed the watchdog before time-out flag is set. The 2nd way lets the watchdog generate a time-out interrupt (the LED will toggle on each time-out cycle).
The 1st way (both WWDT and WDT) can be enabled by commenting out the DISABLE_WDT_TIMEOUT definition.

Special connection requirements
There are no special connection requirements for this example.

Build procedures:
LPC13xx example quickstart for Code Red Xpresso
LPC13xx example quickstart for Keil uVision4
LPC13xx example quickstart for IAR EWARM

Supported boards and board setup:
NXP Xpresso LPC1347 board

Submitting LPCOpen issues:
Community support for LPCOpen

## Macros
#define | DISABLE_WDT_TIMEOUT

## Functions
void | WDT_IRQHandler (void)
| Watchdog Timer Interrupt Handler.
void | SysTick_Handler (void)
| SysTick Interrupt Handler.
int | main (void)
| Main routine for WWDT example.

## Macro Definition Documentation

#define DISABLE_WDT_TIMEOUT

Definition at line 75 of file watchdog.c.

## Function Documentation

int main | ( | void |  | ) |

Main routine for WWDT example.

Main program body.

Returns
  Nothing

defined(CHIP_LPC175X_6X)

Definition at line 140 of file watchdog.c.

void SysTick_Handler | ( | void |  | ) |

SysTick Interrupt Handler.

SysTick 1mS tick handler.

Returns
  Nothing

Note
  Systick interrupt handler feeds WWDT

Definition at line 129 of file watchdog.c.

void WDT_IRQHandler | ( | void |  | ) |

Watchdog Timer Interrupt Handler.

Returns
  Nothing

Note
  Handles watchdog timer warning and timeout events

Definition at line 94 of file watchdog.c.