This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

WATCHdOG TIMER IN WATCH DOG MODE

Other Parts Discussed in Thread: MSP430F5438

Hii,

           I am working on MSP430F5438,and configuring Watch dog timer in Watch dog mode but code not work after  when i set values in watchdog control register.at the every start of code i first i disable the watch dog.and before settings value i again enabled it.

WDTCTL = WDTPW + WDTIS_5 + WDTSSEL_0;

Is it proper way to configure Watchdog timer in watchdog mode ?

  • You should also set WDTCNTCL to clear the current value, so that the watchdog doesn't fire before you can service it next (you don't know what the count was when you disabled it at start-up).

    Also, consider that you are setting the clock to SMCLK. So depending on what frequency SMCLK is at, the timeout will be something other than the 250ms specified for ACLK at 32768Hz. Make sure you can "kick the dog" quickly enough to avoid an inadvertent reset.

**Attention** This is a public forum