Hi,
I have a GPS receiver which stores the year, month, day, hour, min, sec into an object called date time, i want to be able to set the RTC time/day to these times, the date time seem to not be set to the values when i assign them. Is there sometime im missing in my setup.
void rtcSetup()
{
RTCCTL0_H = RTCKEY_H; // Unlock RTC
RTCCTL0_L = RTCTEVIE_L | RTCRDYIE_L; // enable RTC read ready interrupt // enable RTC time event interrupt
RTCCTL13 = RTCBCD | RTCRDY | RTCMODE; // RTC enable, BCD mode, RTC hold
RTCCTL1 &= ~(RTCRDY); // Start RTC
}
void AresManager::setRTC(RtcDateTime *dateTime)
{
RTCYEAR = dateTime->date.year;
RTCMON = dateTime->date.month;
RTCDAY = dateTime->date.day;
RTCHOUR = dateTime->time.hours;
RTCMIN = dateTime->time.mins;
RTCSEC = dateTime->time.secs;
}