Jump to content

using timer event to wake from low power mode

Recommended Posts

(Context: I'm an experienced embedded systems engineer, just dipping my toe into MSP430-land.  My target system is an MSP-EXP430FR5994 LaunchPad dev board.)

General goal: How do I wake the processor N ticks in the future, where one tick is 1/32768 second and N can be as large as 2^15?

My first thought was to use the RTC, but that appears to have a resolution of 1 second. 

My second thought was to use a timer module (e.g. TA1) and use its compare interrupt to wake the processor from LPM4.

So my questions:

  1. Is there a better / alternative way to wake the processor N ticks in the future?
  2. Table 6-1 ("Operating Modes") states that a "COMP" event can wake the processor from LPM4.  Does "COMP" refer to a compare interrupt from a timer?
  3. Is there a block diagram of the counter module(s) somewhere?  I didn't see it in the processor-specific datasheet.



Link to post
Share on other sites

update: I (finally) found rtc_[ab].h and noticed that the RTC provides a 32 bit counter mode. 

My favorite solution would be to run the RTC continually in 32 bit mode and use a compare function to wake it from LPM3.5.

I see that a calendar match will wake the processor, but is there a way to:

  • run the RTC at 32678 Hz rather than at 1 Hz? (I think yes)
  • set the comparison register directly as a 32 bit value rather than as year/month/day/hour/minute/second?


Link to post
Share on other sites
11 hours ago, rdp said:

and use its compare interrupt to wake the processor from LPM4.

LPM4 can be problematic.  There is a bit you can set to enable ACLK in LPM4, but the default is for the clock to be off, and of course, the cpu is off.  If I read the docs correctly, in LPM4 if ACLK is enabled, it uses the VLO as its source, approx. 10KHz, and is susceptible to temperature.  See Table 3-2. System Clocks, Power Modes, and Clock Requests in slau367p.pdf

For a quick read on the RTC take a look at slap113.pdf

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...