LPCOpen Platform  v1.03
LPCOpen Platform for NXP LPC Microcontrollers
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
CHIP: LPC11xx WWDT driver

Detailed Description

Macros

#define WDT_OSC   (CGU_IRC_FREQ)
 

Functions

void Chip_WWDT_Init (LPC_WWDT_T *pWWDT)
 Initialize the Watchdog timer.
 
void Chip_WWDT_DeInit (LPC_WWDT_T *pWWDT)
 Shutdown the Watchdog timer.
 
STATIC INLINE void Chip_WWDT_SetTimeOut (LPC_WWDT_T *pWWDT, uint32_t timeout)
 Set WDT timeout constant value used for feed.
 
STATIC INLINE void Chip_WWDT_Feed (LPC_WWDT_T *pWWDT)
 Feed watchdog timer.
 
STATIC INLINE void Chip_WWDT_SetOption (LPC_WWDT_T *pWWDT, uint32_t options)
 Enable watchdog timer options.
 
STATIC INLINE void Chip_WWDT_UnsetOption (LPC_WWDT_T *pWWDT, uint32_t options)
 Disable/clear watchdog timer options.
 
STATIC INLINE void Chip_WWDT_Start (LPC_WWDT_T *pWWDT)
 Enable WWDT activity.
 
STATIC INLINE uint32_t Chip_WWDT_GetStatus (LPC_WWDT_T *pWWDT)
 Read WWDT status flag.
 
STATIC INLINE void Chip_WWDT_ClearStatusFlag (LPC_WWDT_T *pWWDT, uint32_t status)
 Clear WWDT interrupt status flags.
 
STATIC INLINE uint32_t Chip_WWDT_GetCurrentCount (LPC_WWDT_T *pWWDT)
 Get the current value of WDT.
 

Macro Definition Documentation

#define WDT_OSC   (CGU_IRC_FREQ)

WDT oscillator frequency value

Definition at line 45 of file wwdt_11xx.h.

Function Documentation

STATIC INLINE void Chip_WWDT_ClearStatusFlag ( LPC_WWDT_T pWWDT,
uint32_t  status 
)

Clear WWDT interrupt status flags.

Parameters
pWWDT: The base of WatchDog Timer peripheral on the chip
status: Or'ed value of status flag(s) that you want to clear, should be:
  • WWDT_WDMOD_WDTOF: Clear watchdog timeout flag
  • WWDT_WDMOD_WDINT: Clear watchdog warning flag
Returns
None

Definition at line 181 of file wwdt_11xx.h.

void Chip_WWDT_DeInit ( LPC_WWDT_T pWWDT)

Shutdown the Watchdog timer.

Parameters
pWWDT: The base of WatchDog Timer peripheral on the chip
Returns
None

Definition at line 61 of file wwdt_11xx.c.

STATIC INLINE void Chip_WWDT_Feed ( LPC_WWDT_T pWWDT)

Feed watchdog timer.

Parameters
pWWDT: The base of WatchDog Timer peripheral on the chip
Returns
None
Note
If this function isn't called, a watchdog timer warning will occur. After the warning, a timeout will occur if a feed has happened.

Definition at line 89 of file wwdt_11xx.h.

STATIC INLINE uint32_t Chip_WWDT_GetCurrentCount ( LPC_WWDT_T pWWDT)

Get the current value of WDT.

Parameters
pWWDT: The base of WatchDog Timer peripheral on the chip
Returns
current value of WDT

Definition at line 191 of file wwdt_11xx.h.

STATIC INLINE uint32_t Chip_WWDT_GetStatus ( LPC_WWDT_T pWWDT)

Read WWDT status flag.

Parameters
pWWDT: The base of WatchDog Timer peripheral on the chip
Returns
Watchdog status, an Or'ed value of WWDT_WDMOD_*

Definition at line 168 of file wwdt_11xx.h.

void Chip_WWDT_Init ( LPC_WWDT_T pWWDT)

Initialize the Watchdog timer.

Parameters
pWWDT: The base of WatchDog Timer peripheral on the chip
Returns
None

Definition at line 51 of file wwdt_11xx.c.

STATIC INLINE void Chip_WWDT_SetOption ( LPC_WWDT_T pWWDT,
uint32_t  options 
)

Enable watchdog timer options.

Parameters
pWWDT: The base of WatchDog Timer peripheral on the chip
options: An or'ed set of options of values WWDT_WDMOD_WDEN, WWDT_WDMOD_WDRESET, and WWDT_WDMOD_WDPROTECT
Returns
None
Note
You can enable more than one option at once (ie, WWDT_WDMOD_WDRESET | WWDT_WDMOD_WDPROTECT), but use the WWDT_WDMOD_WDEN after all other options are set (or unset) with no other options.

Definition at line 134 of file wwdt_11xx.h.

STATIC INLINE void Chip_WWDT_SetTimeOut ( LPC_WWDT_T pWWDT,
uint32_t  timeout 
)

Set WDT timeout constant value used for feed.

Parameters
pWWDT: The base of WatchDog Timer peripheral on the chip
timeout: WDT timeout in ticks, between WWDT_TICKS_MIN and WWDT_TICKS_MAX
Returns
none

Definition at line 77 of file wwdt_11xx.h.

STATIC INLINE void Chip_WWDT_Start ( LPC_WWDT_T pWWDT)

Enable WWDT activity.

Parameters
pWWDT: The base of WatchDog Timer peripheral on the chip
Returns
None

Definition at line 158 of file wwdt_11xx.h.

STATIC INLINE void Chip_WWDT_UnsetOption ( LPC_WWDT_T pWWDT,
uint32_t  options 
)

Disable/clear watchdog timer options.

Parameters
pWWDT: The base of WatchDog Timer peripheral on the chip
options: An or'ed set of options of values WWDT_WDMOD_WDEN, WWDT_WDMOD_WDRESET, and WWDT_WDMOD_WDPROTECT
Returns
None
Note
You can disable more than one option at once (ie, WWDT_WDMOD_WDRESET | WWDT_WDMOD_WDTOF).

Definition at line 148 of file wwdt_11xx.h.