Hi,
i am trying to store epoch time in RTC, my code flow is.
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_HIBERNATE);
while(!ROM_SysCtlPeripheralReady(SYSCTL_PERIPH_HIBERNATE)){
}
ROM_HibernateEnableExpClk((ROM_SysCtlClockGet()));
msleep(100); // sleep 100 ms.
ROM_HibernateClockConfig(HIBERNATE_OSC_DISABLE); // disable to use external clock source of 32K
msleep(100); // sleep 100ms
ROM_HibernateRTCEnable();
if(!ROM_HibernateIsActive()){
ROM_HibernateRTCSet(0);
}
// after getting connected to NTP server i update my RTC time.
ROM_HibernateRTCSet(epochTime);
when i print time after some time my RTC data leeds the epoch time, and it continues..
Problem is if i restart the device "ROM_HibernateEnableExpClk((ROM_SysCtlClockGet()));" hangs while waiting for Write control register to set.
Question.
1. what is the reason that is waits for writer control register.
2. ROM_HibernateClockConfig(HIBERNATE_OSC_DISABLE); is it a right way to enable and source RTC through external clock of 32K connected to xosc pin
3. what is the reason that RTC counts faster.