6 operation in low-power modes, 7 software examples – Texas Instruments MSP430x4xx User Manual

Page 196

Advertising
background image

Watchdog Timer Operation

10-6

Watchdog Timer, Watchdog Timer+

10.2.6 Operation in Low-Power Modes

The MSP430 devices have several low-power modes. Different clock signals
are available in different low-power modes. The requirements of the user’s
application and the type of clocking used determine how the WDT should be
configured. For example, the WDT should not be configured in watchdog
mode with SMCLK as its clock source if the user wants to use low-power mode
3 because SMCLK is not active in LPM3 and the WDT would not function. In
this case with the WDT+ SMCLK would remain enabled increasing the current
consumption of LPM3. When the watchdog timer is not required, the
WDTHOLD bit can be used to hold the WDTCNT, reducing power
consumption.

10.2.7 Software Examples

Any write operation to WDTCTL must be a word operation with 05Ah
(WDTPW) in the upper byte:

; Periodically clear an active watchdog

MOV #WDTPW+WDTCNTCL,&WDTCTL

;

; Change watchdog timer interval

MOV #WDTPW+WDTCNTL+SSEL,&WDTCTL

;

; Stop the watchdog

MOV #WDTPW+WDTHOLD,&WDTCTL

;

; Change WDT to interval timer mode, clock/8192 interval

MOV #WDTPW+WDTCNTCL+WDTTMSEL+WDTIS0,&WDTCTL

Advertising