Part Number: DK-TM4C129X
Hi,
I was trying to create an RTC timer using Hibernate module where in i could tap in time information in format HH:MM:SS:ss
I have referred to example code and has written a short program to check the functionality.
I see that the seconds counter always return zero while the sub-seconds counter counts as expected. in "Register View" HIBRTCC is stuck at 0x0. What could be the reason for this??
/****************** Source Code**************************/
//
// Run from the PLL at 120 MHz.
//
luint32_SysClk = SysCtlClockFreqSet((SYSCTL_XTAL_25MHZ |
SYSCTL_OSC_MAIN | SYSCTL_USE_PLL |
SYSCTL_CFG_VCO_480), 120000000);
// Enable the hibernate module.
//
SysCtlPeripheralEnable(SYSCTL_PERIPH_HIBERNATE);
while(!SysCtlPeripheralReady(SYSCTL_PERIPH_HIBERNATE))
{
}
/*
* Check for Hibernate already active
*/
while(HibernateIsActive())
{
luint32_Seconds = HibernateRTCGet();
luint32_SubSeconds = HibernateRTCSSGet();
}
//
// Configure Hibernate module clock.
//
HibernateEnableExpClk(luint32_SysClk);
//
// Configure the clock source
//
HibernateClockConfig(HIBERNATE_OSC_LOWDRIVE);
//
// Enable RTC mode.
//
HibernateRTCEnable();
//
// Configure the hibernate module counter to 24-hour calendar mode.
//
HibernateCounterMode(HIBERNATE_COUNTER_24HR);//HIBERNATE_COUNTER_24HR);
//HibernateRTCSet(0);
while(1)
{
luint32_Seconds = HibernateRTCGet();
luint32_SubSeconds = HibernateRTCSSGet();
}