Dear Sir,
We have developed our own PCB board with TM4C129XCNZAD and using the inbuilt Hibernate RTC feature of processor.
Initialization code
void Hibernate_RTC_Init(void)
{
SysCtlPeripheralEnable(SYSCTL_PERIPH_HIBERNATE);
HibernateEnableExpClk(ui32SysClock);
HibernateClockConfig(HIBERNATE_OSC_LFIOSC);
// Enable RTC mode.
HibernateRTCEnable();
// Configure the hibernate module counter to 24-hour calendar mode.
HibernateCounterMode(HIBERNATE_COUNTER_24HR);
}
We are using already available DateTime.C file of Ti example and also DateTimeDisplayGet function for fetching date time .
We have also connected 3V Coin battery to the VBAT pin to maintain calander.
Date Time setting and Reading is fine at that moment. It is synchronized with system Clock of PC.
We keep board OFF for more than 12 hour and found that there is lagging in time by 1 hour.
Why it is lagging?