WDT_A Operation
759
SLAU356I – March 2015 – Revised June 2019
Copyright © 2015–2019, Texas Instruments Incorporated
Watchdog Timer (WDT_A)
17.2 WDT_A Operation
The watchdog timer module can be configured with the WDTCTL register as either a watchdog or an
interval timer. WDTCTL is a 16-bit password-protected read/write register. Any read or write access must
use half- word instructions, and write accesses must include the write password 05Ah in the upper byte. A
write to WDTCTL with any value other than 05Ah in the upper byte is a password violation and causes a
system reset, regardless of the WDT mode of operation. Any read of WDTCTL reads 069h in the upper
byte. Writing byte wide only to the upper or lower parts of WDTCTL results in a system reset, as this
particular register must always be accessed in half-word mode.
NOTE:
Watchdog timer powers up active.
After a system reset, the WDT_A module is automatically configured in the watchdog mode
with a count value of 2
15
, using the SMCLK as the source. The application must set up or halt
the WDT before the initial reset interval expires. As an example, if the SMCLK is default
sourced by the DCO, which is set to 3 MHz, this results in an approximate 10.92-ms
watchdog interval window. If the DCO frequency is changed, the application must control the
watchdog time-out within the modified interval (see
17.2.1 Watchdog Timer Counter (WDTCNT)
The WDTCNT is a 32-bit up counter that is not directly accessible by software. The WDTCNT is controlled
and its time intervals are selected through the Watchdog Timer Control (WDTCTL) register. The WDTCNT
can be sourced from SMCLK, ACLK, VLOCLK, and BCLK. The clock source is selected with the
WDTSSEL bits. The timer interval is selected with the WDTIS bits. This counter is automatically reset on a
Soft Reset (or higher class of reset).
NOTE:
The WDT counter is automatically configured to stop counting when the CPU is halted. This
is to enable code development and debug without having to explicitly disable the WDT or
without having to constantly encounter a watchdog initiated reset if the counter was allowed
to continue running with the CPU halted. The application can choose to ignore the halt
condition of the CPU. Refer to the SYSCTL chapter for more details on how this can be
configured.
17.2.2 Watchdog Mode
After a system reset condition, the WDT_A module is configured in the watchdog mode with an initial
10.92-ms (approximate) reset interval using the SMCLK. The user must set up, halt, or clear the watchdog
timer before this initial reset interval expires, or another system reset is generated. When the watchdog
timer is configured to operate in watchdog mode, either writing to WDTCTL with an incorrect password or
expiration of the selected time interval also triggers a system reset. A system reset resets the watchdog
timer to its default condition.
17.2.3 Interval Timer Mode
Setting the WDTTMSEL bit to 1 selects the interval timer mode. This mode can be used to provide
periodic interrupts. In interval timer mode, the WDT generates an interrupt at the end of each interval.
Refer to
for details on handling of WDT related interrupt flags.
NOTE:
Modifying the watchdog timer
The watchdog timer interval should be changed together with WDTCNTCL = 1 in a single
instruction to avoid an unexpected immediate system reset or interrupt. The watchdog timer
should be halted before changing the clock source to avoid a possible incorrect interval.