Other Parts Discussed in Thread: MSP430FR5994
Tool/software: Code Composer Studio
Dear Team ,
We are using MSP430FR5994 Launch pad to examine the RTC_C Alarm module. Please find the configuration of RTC registers below. Alarm interrupt is not occurring. only the Event interrupt is occurring at every minute. RTC time registers are updating properly. I have gone through the errata sheet also. Not mentioned anything on this.
RTCCTL0 = RTCKEY ;
RTCCTL1 |= RTCMODE + RTCSSEL_0 ;
RTCCTL3 = 0x00;
RTCAMIN = 0x00;
RTCAHOUR = 0x00;
RTCADOW = 0x00;
RTCADAY = 0x00;
RTCCTL0_L = 0x00 ;
RTCAMIN = 0x02 ; // Alarm every 2 minutes
RTCCTL0_L = RTCRDYIE + RTCAIE ; // Enable alarm interrupt
RTCCTL0_L &= ~RTCTEVIFG; // disable the event interrupt flag;
RTCCTL1 &= ~ RTCHOLD ; // Release RTC for the operation
#pragma vector=RTC_VECTOR
__interrupt void RTC_ISR()
{
if(RTCCTL0_L & RTCRDYIFG)
{
RTCCTL0_L &= ~RTCRDYIFG;
if(strRtcFlags.bWriteToRtc)
{
strRtcFlags.bWriteToRtc =0;
RTCSEC = strRtcWrite.ucSecs;
RTCMIN = strRtcWrite.ucMins;
RTCHOUR = strRtcWrite.ucHours;
RTCDAY = strRtcWrite.ucDate;
RTCMON = strRtcWrite.ucMonth;
RTCYEAR = ((unsigned int)strRtcWrite.ucYear + 2000 );
}
strRtcRead.ucSecs = strMainParam.strTime2.ucSec = RTCSEC;
strRtcRead.ucMins = strMainParam.strTime2.ucMin = RTCMIN;
strRtcRead.ucHours = strMainParam.strTime2.ucHrs = RTCHOUR;
strRtcRead.ucDate = strMainParam.strTime2.ucDate = RTCDAY;
strRtcRead.ucMonth = strMainParam.strTime2.ucMonth = RTCMON;
strRtcRead.ucYear = strMainParam.strTime2.ucYear = (unsigned char)(RTCYEAR-2000);
}
if(RTCCTL0_L & RTCAIFG)
RTCCTL0_L &= ~ RTCAIFG;
if(RTCCTL0_L & RTCTEVIFG)
RTCCTL0_L &= ~RTCTEVIFG;
}
Thanks & Regards,
Century