30. lpc17xx_wdt Module¶
Watchdog client library functions. Find implementation details in LPC17xx CMSIS-Compliant Standard Peripheral Firmware Driver Library documentation.
- class robovero.lpc17xx_wdt.WDT_CLK_OPT¶
Clock source option for WDT.
- WDT_CLKSRC_IRC0: Clock source from Internal RC oscillator
- WDT_CLKSRC_PCLK: Selects the APB peripheral clock (PCLK
- WDT_CLKSRC_RTC: Selects the RTC oscillator
- WDT_CLKSRC_IRC = 0¶
- WDT_CLKSRC_PCLK = 1¶
- WDT_CLKSRC_RTC = 2¶
- robovero.lpc17xx_wdt.WDT_ClrTimeOutFlag()¶
Clear WDT timeout flag.
- robovero.lpc17xx_wdt.WDT_Feed()¶
After setting WDTEN, call this function to start Watchdog or reload the Watchdog timer.
- robovero.lpc17xx_wdt.WDT_GetCurrentCount()¶
Get the current value of WDT.
Return:
- current value of WDT
- robovero.lpc17xx_wdt.WDT_Init(ClkSrc, WDTMode)¶
Initialize the Watchdog timer function.
Args:
- ClkSrc: Select clock source, should be:
- WDT_CLKSRC_IRC: Clock source from Internal RC oscillator
- WDT_CLKSRC_PCLK: Selects the APB peripheral clock (PCLK)
- WDT_CLKSRC_RTC: Selects the RTC oscillator
- WDTMode: WDT mode, should be:
- WDT_MODE_INT_ONLY: Use WDT to generate interrupt only
- WDT_MODE_RESET: Use WDT to generate interrupt and reset MCU
- ClkSrc: Select clock source, should be:
- class robovero.lpc17xx_wdt.WDT_MODE_OPT¶
WDT operation mode.
- WDT_MODE_INT_ONLY: Use WDT to generate interrupt only
- WDT_MODE_RESET: Use WDT to generate interrupt and reset MCU
- WDT_MODE_INT_ONLY = 0¶
- WDT_MODE_RESET = 1¶
- robovero.lpc17xx_wdt.WDT_ReadTimeOutFlag()¶
Read WDT timeout flag.
Return:
- timeout flag status of WDT
- robovero.lpc17xx_wdt.WDT_Start(TimeOut)¶
Start WDT activity with given timeout value.
Args:
- TimeOut: WDT reset after timeout if it is not feed
- robovero.lpc17xx_wdt.WDT_UpdateTimeOut(TimeOut)¶
Update WDT timeout value and feed.
Args:
- TimeOut: timeout value to be updated