Part Number: MSP430FR5994
I understand the OutOfBox code uses the RTC_C to manage the rate which it collects temperature/voltage data (either to send to PC GUI or to log in FRAM). When sending data to the GUI the updates seem to happen more frequently than I expected from the RTC initialization code. The Init_RTC initialization code appears setup to trigger an interrupt every minute but the updates frequency seems to be every 25s or about twice as fast. I added some calibration code to output 512 Hertz and measured the output at 511.2Hz which, without any additional temp/voltage calibration, seems very reasonable (see image below). I then speculated that maybe the update loop was driven by a timer other than the RTC. I couldn't find this timer so I added some code to flash LED each time the RTC ISR was entered. The flashes occur with the updates so I am fairly convinced that the RTC does drive the events the updates. Can anyone explain why these updates are occurring more frequently than once a minute? Is it possible the "Minute event" is triggered twice a minute, once for each transition of the minute waveform? Any help is greatly appreciated.
void Init_RTC()
{
//Setup Current Time for Calendar (BINARY FORMAT)
calendar.Seconds = 0x25;
calendar.Minutes = 0x05;
calendar.Hours = 0x0D;
calendar.DayOfWeek = 0x02;
calendar.DayOfMonth = 0x0C;
calendar.Month = 0x02;
calendar.Year = 0x07e3; //0x2019;
// Initialize RTC with the specified Calendar above
RTC_C_initCalendar(RTC_C_BASE,
&calendar,
RTC_C_FORMAT_BINARY); //using RTC_C_FORMAT_BCD scrambles file time stamp
RTC_C_setCalendarEvent(RTC_C_BASE,
RTC_C_CALENDAREVENT_MINUTECHANGE
);
RTC_C_clearInterrupt(RTC_C_BASE,
RTC_C_TIME_EVENT_INTERRUPT
);
RTC_C_enableInterrupt(RTC_C_BASE,
RTC_C_TIME_EVENT_INTERRUPT
);
//Start RTC Clock
RTC_C_startClock(RTC_C_BASE);
}
