rdp 0 Posted July 15, 2020 Share Posted July 15, 2020 (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: Is there a better / alternative way to wake the processor N ticks in the future? 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? Is there a block diagram of the counter module(s) somewhere? I didn't see it in the processor-specific datasheet. Quote Link to post Share on other sites
rdp 0 Posted July 15, 2020 Author Share Posted July 15, 2020 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? Quote Link to post Share on other sites
NurseBob 111 Posted July 16, 2020 Share Posted July 16, 2020 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 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.