NXP's driver library for LPC17xx, ported to mbed's online compiler. Not tested! I had to fix a lot of warings and found a couple of pretty obvious bugs, so the chances are there are more. Original: http://ics.nxp.com/support/documents/microcontrollers/zip/lpc17xx.cmsis.driver.library.zip

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

WDT_Public_Functions

WDT_Public_Functions
[WDT]

Functions

void WDT_Init (uint32_t ClkSrc, uint32_t WDTMode)
 Initial for Watchdog function Clock source = RTC ,.
void WDT_Start (uint32_t TimeOut)
 Start WDT activity with given timeout value.
void WDT_Feed (void)
 After set WDTEN, call this function to start Watchdog or reload the Watchdog timer.
FlagStatus WDT_ReadTimeOutFlag (void)
 Read WDT Time out flag.
void WDT_ClrTimeOutFlag (void)
 Clear WDT Time out flag.
void WDT_UpdateTimeOut (uint32_t TimeOut)
 Update WDT timeout value and feed.
uint32_t WDT_GetCurrentCount (void)
 Get the current value of WDT.

Function Documentation

void WDT_ClrTimeOutFlag ( void   )

Clear WDT Time out flag.

Parameters:
[in]None
Returns:
None

Definition at line 209 of file lpc17xx_wdt.c.

void WDT_Feed ( void   )

After set WDTEN, call this function to start Watchdog or reload the Watchdog timer.

Parameters:
[in]None
Returns:
None

Definition at line 236 of file lpc17xx_wdt.c.

uint32_t WDT_GetCurrentCount ( void   )

Get the current value of WDT.

Parameters:
[in]None
Returns:
current value of WDT

Definition at line 251 of file lpc17xx_wdt.c.

void WDT_Init ( uint32_t  ClkSrc,
uint32_t  WDTMode 
)

Initial for Watchdog function Clock source = RTC ,.

Parameters:
[in]ClkSrcSelect clock source

  • 0:Clock source from Internal RC oscillator
  • 1: Selects the APB peripheral clock (PCLK)
  • 2:Selects the RTC oscillator
[in]WDTModeWDT mode

  • 0: Use WDT to generate interrupt only
  • 1:WDT_MODE_RESET
Returns:
None

Definition at line 162 of file lpc17xx_wdt.c.

FlagStatus WDT_ReadTimeOutFlag ( void   )

Read WDT Time out flag.

Parameters:
[in]None
Returns:
Time out flag status of WDT

Definition at line 199 of file lpc17xx_wdt.c.

void WDT_Start ( uint32_t  TimeOut )

Start WDT activity with given timeout value.

Parameters:
[in]TimeOutWDT reset after timeout if it is not feed
Returns:
None

Definition at line 182 of file lpc17xx_wdt.c.

void WDT_UpdateTimeOut ( uint32_t  TimeOut )

Update WDT timeout value and feed.

Parameters:
[in]TimeOutTimeOut value to be updated
Returns:
None

Definition at line 219 of file lpc17xx_wdt.c.