Texas Instruments MSP430x1xx Watchdog Timer Operation, Watchdog Timer Counter, Watchdog Mode

Models: MSP430x1xx

1 432
Download 432 pages 41.81 Kb
Page 204
Image 204

Watchdog Timer Operation

10.2 Watchdog Timer Operation

The WDT module can be configured as either a watchdog or interval timer with the WDTCTL register. The WDTCTL register also contains control bits to configure the RST/NMI pin. WDTCTL is a 16-bit, password-protected, read/write register. Any read or write access must use word instructions and write accesses must include the write password 05Ah in the upper byte. Any write to WDTCTL with any value other than 05Ah in the upper byte is a security key violation and triggers a PUC system reset regardless of timer mode. Any read of WDTCTL reads 069h in the upper byte.

10.2.1 Watchdog Timer Counter

The watchdog timer counter (WDTCNT) is a 16-bit up-counter that is not directly accessible by software. The WDTCNT is controlled and time intervals selected through the watchdog timer control register WDTCTL.

The WDTCNT can be sourced from ACLK or SMCLK. The clock source is selected with the WDTSSEL bit.

10.2.2 Watchdog Mode

After a PUC condition, the WDT module is configured in the watchdog mode with an initial ~32-ms reset interval using the DCOCLK. The user must setup, halt, or clear the WDT prior to the expiration of the initial reset interval or another PUC will be generated. When the WDT is configured to operate in watchdog mode, either writing to WDTCTL with an incorrect password, or expiration of the selected time interval triggers a PUC. A PUC resets the WDT to its default condition and configures the RST/NMI pin to reset mode.

10.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 WDTIFG flag is set at the expiration of the selected time interval. A PUC is not generated in interval timer mode at expiration of the selected timer interval and the WDTIFG enable bit WDTIE remains unchanged.

When the WDTIE bit and the GIE bit are set, the WDTIFG flag requests an interrupt. The WDTIFG interrupt flag is automatically reset when its interrupt request is serviced, or may be reset by software. The interrupt vector address in interval timer mode is different from that in watchdog mode.

Note: Modifying the Watchdog Timer

The WDT interval should be changed together with WDTCNTCL = 1 in a single instruction to avoid an unexpected immediate PUC or interrupt.

The WDT should be halted before changing the clock source to avoid a possible incorrect interval.

10-4Watchdog Timer

Page 204
Image 204
Texas Instruments MSP430x1xx manual Watchdog Timer Operation, Watchdog Timer Counter, Watchdog Mode, Interval Timer Mode

MSP430x1xx specifications

The Texas Instruments MSP430x1xx series is a family of ultra-low-power microcontrollers that are highly regarded in the embedded systems community for their versatility and performance. Designed for applications ranging from portable instrumentation to low-power industrial devices, the MSP430x1xx combines flexibility and efficiency with advanced features tailored for energy-sensitive applications.

One of the standout characteristics of the MSP430x1xx is its ultra-low-power operation. This series offers several low-power modes that can significantly extend battery life in portable devices. The microcontroller can be in active mode, low-power mode, or even in a deep sleep state, allowing developers to optimize power consumption based on the application's requirements. In fact, some configurations can operate at just a few microamps, making it ideal for battery-operated devices.

Another key feature is the 16-bit RISC architecture that provides powerful processing capabilities while maintaining a low power profile. The MSP430x1xx series supports a maximum clock speed of 16 MHz, allowing for efficient task execution while consuming minimal energy. This architecture ensures that programs run smoothly while the microcontroller remains energy efficient.

The MSP430x1xx is equipped with various integrated peripherals, including analog-to-digital converters (ADCs), timers, and communication interfaces like UART, SPI, and I2C. The inclusion of a powerful ADC enables the microcontroller to handle sensor readings with high accuracy, making it suitable for applications like environmental monitoring and medical devices. The integrated timers provide essential functionality for real-time applications, allowing for event-driven programming and precise timing control.

Memory options in the MSP430x1xx series are also robust, with configurations offering flash memory sizes from 1 KB to 64 KB. This flexibility allows developers to choose the optimal memory size for their specific applications, accommodating a wide range of requirements.

Additionally, the MSP430x1xx microcontrollers are designed with a wide operating voltage range, typically from 1.8V to 3.6V, making them compatible with various power sources and further enhancing their usability in diverse applications.

In summary, the Texas Instruments MSP430x1xx series of microcontrollers is an excellent choice for developers seeking low-power, high-performance solutions for embedded applications. With an efficient architecture, a rich set of peripherals, and flexible memory options, these microcontrollers are positioned to meet the growing demands of modern electronic designs, particularly in battery-powered and energy-sensitive applications.