MSP430 DriverLib for MSP430i2xx Devices  2.91.13.01
wdt

Functions

void WDT_hold (uint16_t baseAddress)
 Holds the Watchdog Timer. More...
 
void WDT_start (uint16_t baseAddress)
 Starts the Watchdog Timer. More...
 
void WDT_resetTimer (uint16_t baseAddress)
 Resets the timer counter of the Watchdog Timer. More...
 
void WDT_initWatchdogTimer (uint16_t baseAddress, uint8_t clockSelect, uint8_t clockDivider)
 Sets the clock source for the Watchdog Timer in watchdog mode. More...
 
void WDT_initIntervalTimer (uint16_t baseAddress, uint8_t clockSelect, uint8_t clockDivider)
 Sets the clock source for the Watchdog Timer in timer interval mode. More...
 

Detailed Description

Function Documentation

§ WDT_hold()

void WDT_hold ( uint16_t  baseAddress)

Holds the Watchdog Timer.

This function stops the watchdog timer from running, that way no interrupt or PUC is asserted.

Parameters
baseAddressis the base address of the WDT module.
Returns
None

§ WDT_initIntervalTimer()

void WDT_initIntervalTimer ( uint16_t  baseAddress,
uint8_t  clockSelect,
uint8_t  clockDivider 
)

Sets the clock source for the Watchdog Timer in timer interval mode.

This function sets the watchdog timer as timer interval mode, which will assert an interrupt without causing a PUC.

Parameters
baseAddressis the base address of the WDT module.
clockSelectis the clock source that the watchdog timer will use. Valid values are:
  • WDT_CLOCKSOURCE_SMCLK [Default]
  • WDT_CLOCKSOURCE_ACLK
    Modified bits are WDTSSEL of WDTCTL register.
clockDivideris the divider of the clock source, in turn setting the watchdog timer interval. Valid values are:
  • WDT_CLOCKDIVIDER_32K [Default]
  • WDT_CLOCKDIVIDER_8192
  • WDT_CLOCKDIVIDER_512
  • WDT_CLOCKDIVIDER_64
    Modified bits are WDTIS and WDTHOLD of WDTCTL register.
Returns
None

§ WDT_initWatchdogTimer()

void WDT_initWatchdogTimer ( uint16_t  baseAddress,
uint8_t  clockSelect,
uint8_t  clockDivider 
)

Sets the clock source for the Watchdog Timer in watchdog mode.

This function sets the watchdog timer in watchdog mode, which will cause a PUC when the timer overflows. When in the mode, a PUC can be avoided with a call to WDT_resetTimer() before the timer runs out.

Parameters
baseAddressis the base address of the WDT module.
clockSelectis the clock source that the watchdog timer will use. Valid values are:
  • WDT_CLOCKSOURCE_SMCLK [Default]
  • WDT_CLOCKSOURCE_ACLK
    Modified bits are WDTSSEL of WDTCTL register.
clockDivideris the divider of the clock source, in turn setting the watchdog timer interval. Valid values are:
  • WDT_CLOCKDIVIDER_32K [Default]
  • WDT_CLOCKDIVIDER_8192
  • WDT_CLOCKDIVIDER_512
  • WDT_CLOCKDIVIDER_64
    Modified bits are WDTIS and WDTHOLD of WDTCTL register.
Returns
None

§ WDT_resetTimer()

void WDT_resetTimer ( uint16_t  baseAddress)

Resets the timer counter of the Watchdog Timer.

This function resets the watchdog timer to 0x0000h.

Parameters
baseAddressis the base address of the WDT module.
Returns
None

§ WDT_start()

void WDT_start ( uint16_t  baseAddress)

Starts the Watchdog Timer.

This function starts the watchdog timer functionality to start counting again.

Parameters
baseAddressis the base address of the WDT module.
Returns
None

Copyright 2020, Texas Instruments Incorporated