Go to the documentation of this file.
32 #ifndef __WWDT_11XX_H_
33 #define __WWDT_11XX_H_
44 #if !defined(CHIP_LPC11CXX) || defined(CHIP_LPC1125)
45 #define WATCHDOG_WINDOW_SUPPORT
48 #if defined(CHIP_LPC11AXX) || defined(CHIP_LPC11EXX) || defined(CHIP_LPC11UXX)
49 #define WATCHDOG_CLKSEL_SUPPORT
60 #ifdef WATCHDOG_CLKSEL_SUPPORT
65 #ifdef WATCHDOG_WINDOW_SUPPORT
75 #define WWDT_WDMOD_BITMASK ((uint32_t) 0x1F)
77 #define WWDT_WDMOD_WDEN ((uint32_t) (1 << 0))
79 #define WWDT_WDMOD_WDRESET ((uint32_t) (1 << 1))
81 #define WWDT_WDMOD_WDTOF ((uint32_t) (1 << 2))
83 #define WWDT_WDMOD_WDINT ((uint32_t) (1 << 3))
85 #define WWDT_WDMOD_WDPROTECT ((uint32_t) (1 << 4))
125 #if defined(WATCHDOG_WINDOW_SUPPORT)
168 pWWDT->
MOD |= options;
226 #if defined(WATCHDOG_CLKSEL_SUPPORT)
231 #define WWDT_CLKSEL_BITMASK ((uint32_t) 0x10000003)
233 #define WWDT_CLKSEL_SOURCE(n) ((uint32_t) (n & 0x03))
235 #define WWDT_CLKSEL_LOCK ((uint32_t) (1 << 31))
241 WWDT_CLKSRC_IRC = WWDT_CLKSEL_SOURCE(0),
242 WWDT_CLKSRC_WATCHDOG_WDOSC = WWDT_CLKSEL_SOURCE(1),
243 } CHIP_WWDT_CLK_SRC_T;
253 pWWDT->CLKSEL = wdtClkSrc & WWDT_CLKSEL_BITMASK;
STATIC INLINE uint32_t Chip_WWDT_GetCurrentCount(LPC_WWDT_T *pWWDT)
Get the current value of WDT.
STATIC INLINE void Chip_WWDT_Start(LPC_WWDT_T *pWWDT)
Enable WWDT activity.
#define WWDT_WDMOD_BITMASK
Watchdog Mode register definitions.
STATIC INLINE void Chip_WWDT_SetOption(LPC_WWDT_T *pWWDT, uint32_t options)
Enable watchdog timer options.
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.
void Chip_WWDT_ClearStatusFlag(LPC_WWDT_T *pWWDT, uint32_t status)
Clear WWDT interrupt status flags.
STATIC INLINE void Chip_WWDT_SetWarning(LPC_WWDT_T *pWWDT, uint32_t timeout)
Set WWDT warning interrupt.
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_UnsetOption(LPC_WWDT_T *pWWDT, uint32_t options)
Disable/clear watchdog timer options.
STATIC INLINE uint32_t Chip_WWDT_GetStatus(LPC_WWDT_T *pWWDT)
Read WWDT status flag.
STATIC INLINE void Chip_WWDT_SetWindow(LPC_WWDT_T *pWWDT, uint32_t timeout)
Set WWDT window time.
Windowed Watchdog register block structure.