Functions
wdt.c File Reference
#include "driverlib/5xx_6xx/wdt.h"
#include "inc/hw_types.h"
#include "deprecated/CCS/msp430xgeneric.h"
#include "driverlib/5xx_6xx/debug.h"

Functions

void WDT_hold (unsigned int baseAddress)
void WDT_start (unsigned int baseAddress)
void WDT_resetTimer (unsigned int baseAddress)
void WDT_watchdogTimerInit (unsigned int baseAddress, unsigned char clockSelect, unsigned char clockDivider)
void WDT_intervalTimerInit (unsigned int baseAddress, unsigned char clockSelect, unsigned char clockDivider)

Function Documentation

void WDT_hold ( unsigned int  baseAddress)

Holds the Watchdog Timer.

Parameters:
baseAddressis the base address of the WDT module.

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

Returns:
None

References HWREG, and HWREGB.

void WDT_start ( unsigned int  baseAddress)

Starts the Watchdog Timer.

Parameters:
baseAddressis the base address of the WDT module.

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

Returns:
NONE

References HWREG, and HWREGB.

void WDT_resetTimer ( unsigned int  baseAddress)

Clears the timer counter of the Watchdog Timer.

Parameters:
baseAddressis the base address of the WDT module.

This function clears the watchdog timer to 0x0000h.

Returns:
None

References HWREG, and HWREGB.

void WDT_watchdogTimerInit ( unsigned int  baseAddress,
unsigned char  clockSelect,
unsigned char  clockDivider 
)

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

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 WDT_CLOCKSOURCE_VLOCLK WDT_CLOCKSOURCE_XCLK 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_2G WDT_CLOCKDIVIDER_128M WDT_CLOCKDIVIDER_8192K WDT_CLOCKDIVIDER_512K WDT_CLOCKDIVIDER_32K [Default] WDT_CLOCKDIVIDER_8192 WDT_CLOCKDIVIDER_512 WDT_CLOCKDIVIDER_64 Modifed bits are WDTIS of WDTCTL register.

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

Returns:
None

References HWREG.

void WDT_intervalTimerInit ( unsigned int  baseAddress,
unsigned char  clockSelect,
unsigned char  clockDivider 
)

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

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 WDT_CLOCKSOURCE_VLOCLK WDT_CLOCKSOURCE_XCLK 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_2G WDT_CLOCKDIVIDER_128M WDT_CLOCKDIVIDER_8192K WDT_CLOCKDIVIDER_512K WDT_CLOCKDIVIDER_32K [Default] WDT_CLOCKDIVIDER_8192 WDT_CLOCKDIVIDER_512 WDT_CLOCKDIVIDER_64 Modifed bits are WDTIS of WDTCTL register.

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.

Returns:
None

References HWREG.


Copyright 2012, Texas Instruments Incorporated