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 Kicking in LPM

I am trying to activate watchdog by command 

WDTCTL = WDTPW + WDTCNTCL

it works fine with normal opertaing mode. but when i put micro in LPM0 it tries to reset the micro. in other words it tries to come out of LPM.

in my code i come out of LPM after some timer interrupt event only.

how i can avoid this reset in LPM.

  • The watchdog is designed to reset the chip when it overflows -- in your case, after 32768 SMCLKs. In LPM0, the CPU is off and SMCLK keeps going. It is will reach 32768 counts before you know it.

  • Low power modes and watchdogs can be a bit tricky.  Some devices (e.g. 2xx range) have a failsafe that prevents the watchdog clock source being disabled which effectively makes some low power modes unachievable so you might not be able to get round it using an alternative low power mode.

    If you are expecting to be woken up within a short time you might be able to adjust the timeout period to longer than the sleep time. Alternatively you will probably have to disable the watchdog before going to sleep and then start it again when you wake up.

  • In Low-power mode where the CPU stops there is no sense to use a Watchdog.

    Before you go into LPM shut down the Watchdog, this will save also energy, and on the next line after LPM you bring up the Watchdog.

     

    -Leo

**Attention** This is a public forum