This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR5994: OutOfBox_MSP430FR5994 code question with the Launchpad evaluation board

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);
}

  • Hi James

    I will run this demo first and feedback to you later.
  • Hello Gary, I found the problem. The demo code constantly re-initializes the RTC each time it enters SDCARD_LOG_MODE in the main loop. This forces the count to start from 25secs. I suspect that the original author of the code was trying to recover from LPM3.5 (which looses the RTC contents) by running Init_RTC each time (there was an MSP430FR5994 bug at the time and the LPM3.5 entry was commented out). The author probably never saw the RTC was stuck at the initialization time. The fix is too save the current time in FRAM. Anyway, my problem is resolved. thank you for helping. I really appreciate it.

**Attention** This is a public forum