Part Number: MSP430FR5994
Other Parts Discussed in Thread: ENERGYTRACE
I am using the RTC_C module in calendar mode and I am using the RTCTEV interrupt to check if it is time to do a sensor sample. I am running a test in which I am performing sensor samples once per minute. It will run correctly when I am debugging my project, but then when I stop the debugger the interrupt does not trigger.
I am using LPM3.5, and I've verified that every code path from startup enables RTCTEVIE prior to clearing LOCKLPM5; I have also verified that the code also verifies that RTCTEVIE is set prior to enabling LPM3.5. For my environment, I am using CCS version 7.2.0.00013 for my IDE, and I am using TI/RTOS version 2.20.00.06. If I stop the debugger while the debug session is running (not when it is paused) and the MSP430 is in LPM3.5, then the RTCTEV interrupt does not occur. Even if I do a hard reset (pull RST line low) the RTCTEV interrupt never triggers. However, if I set a breakpoint somewhere in the code and stop the debugger while the MSP430 is in an active mode and paused at the breakpoint and then perform a hard reset, then the RTCTEV interrupt will trigger every minute as it should.
I am monitoring when the RTCTEV interrupt triggers by using EnergyTrace and watching the power draw. There is a noticeable change in power draw when my system does a sensor sample. Even if for some reason the RTCTEV interrupt is triggering but the sensor sample would not somehow occur, there still is a measurable power draw when the the MSP430 services the RTC interrupt. Through this method, I am verifying that in some cases the RTCTEV interrupt never triggers.
Is there something else that may be set incorrectly prior to entering LPM3.5 that can prevent the RTCTEV interrupt from triggering? Here are the RTC_C register settings as they are set prior to entering LPM3.5 (as read from the debugger, paused just prior to entering LPM3.5):
RTCCTL0: 0x9660
RTCCTL13: 0x0030
RTCOCAL: 0x0000
RTCTCMP: 0x4000
RTCPS0CTL: 0x0101
RTCPS1CTL: 0x0101
RTCPS: 0xD776
RTCIV: 0x0006
RTCTIM0: 0x0206
RTCCNT12: 0x0408
RTCTIM1: 0x0000
RTCCNT34: 0x0000
RTCDATE: 0x0405
RTCYEAR: 0x07E3
RTCAMINHR: 0x8480
RTCADOWDAY: 0x0000
RT0PS: 0xEE
RT1PS: 0xB2
RTCCNT1: 0x13
RTCCNT2: 0x06
RTCCNT3: 0x00
RTCCNT4: 0x00

