HI,
The RTC is showing a positive error of 9 mins 38 seconds over a period of 12 hrs 10 min, Does this suggest that the crystal is defective? My initialization code is given below:
void RTCCInit(void)
{
if (!HibernateIsActive())
{
HibernateEnableExpClk(SysCtlClockGet());
HibernateClockConfig(HIBERNATE_OSC_HIGHDRIVE);
HibernateRTCEnable();
}
}
Subsequent to this I am setting the time and observing it overnight and the clock gains time as above. I am using time.h to convert between local time and unix time.
b) Let me know if the following calculations are correct:
The above error translates to 578 seconds in 43800 seconds, or 0.845 seconds in 64 seconds. Therefore should I write (0x7fff+ (0.845*32768)) in the RTC trim register to correct this error?
Regards