MSP430 Watchdog / RTC

In my application build around an MSP4302272, during power down periods, only RTC is ON, the MSP430 sleeping in LPM3 power mode.

The RTC time base is obviously the ACLK, a 32768Hz external oscillator.

I would like to know what to do with the WATCHDOG:

  • stop it completely during LPM3 ?

  • going out from LPM3 each second to refresh Watchdog timer and turn back to LPM3 just after ? The problems for this second option are that max WATCHDOG period is 1 second and that going out from LPM3 each second will dramatically increase global power consumption.

Thanks for your help

I assume that you use an external 32768Hz crystal with the internal LFXT1 oscillator. Thus you can have an ACLK of 32768, 16384, 8192, or 4096Hz (see DIVA bits of BCSCT1 register).

To implement a RTC, you need to feed ACLK to a timer/counter. You have 3 choices, the WDT, TimerA, or TimerB.

If you choose to use the WDT to implement RTC, you can program WDT to generate an interrupt every 64, 512, 8192, or 32768 ACLKs (see WDTIS bits of WSTCTL register). Thus the longest interval between interrupts is 8 seconds (32768 cycles of 4096Hz). Inside the ISR, you need to increment a software counter, which is the essence of your RTC. Without this counter, you do not have a RTC, and without an ISR to increment it, your RTC stops ticking. The resolution of the RTC in this case is 8 seconds.

You can also choose to disable the WDT and use TimerA or TimerB to increment RTC. The longest interval between interrupts can be up to 128 seconds. The resolution of the RTC in this case is 128 seconds. It requires less frequent ISR, but since TimerA and TimerB include more circuits as compared with the WDT, they consume more current as compared with WDT.

Really thanks for your help