EasyManuals Logo

Texas Instruments MSP430 User Manual

Texas Instruments MSP430
413 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #146 background imageLoading...
Page #146 background image
146
Explanation
Unlike previous timer examples, 12 kHz ACLK is used. ACLK is divided by 8 to make it 1.5 kHz low speed
clock source for the WDT+ module. This clock is further prescaled by 32768 to get a WDT+ timeout of
about 22 seconds.
/*
* WDTCTL, Watchdog Timer+ Register
*
* WDTPW -- Watchdog password
* ~WDTHOLD -- Watchdog timer+ is not stopped
* ~WDTNMIES -- NMI on rising edge
* ~WDTNMI -- Reset function
* ~WDTTMSEL -- Watchdog mode
* ~WDTCNTCL -- No action
* WDTSSEL -- ACLK
* ~WDTIS0 -- Watchdog clock source bit0 disabled
* ~WDTIS1 -- Watchdog clock source bit1 disabled
*
* Note: ~<BIT> indicates that <BIT> has value zero
*/
WDTCTL = WDTPW | WDTSSEL;
In the main loop, P1.0 toggles without any issue. WDT+ is regularly refreshed. However, when the user
button is pressed, WDT+ is no longer refreshed and P1.6 LED is toggled inside a simulated undesired
loop. P1.0 LED appears to have gotten stuck. This causes the WDT+ to cross maximum timeout limit
and thereby trigger a reset.
P1OUT ^= BIT0;
_delay_cycles(60000);
WDTCTL = WDTPW | WDTCNTCL;
if((P1IN & BIT3) == !BIT3)
{
WDTCTL = WDTPW | WDTSSEL;

Table of Contents

Other manuals for Texas Instruments MSP430

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments MSP430 and is the answer not in the manual?

Texas Instruments MSP430 Specifications

General IconGeneral
BrandTexas Instruments
ModelMSP430
CategoryMicrocontrollers
LanguageEnglish

Related product manuals