RTC - Sub clock stopping at POR

Hi,

As per the datasheet and debugging, looks like the sub clock stops at the reset till it is started in RTC initialisation. This results in losing RTC time, every time the system boots. I am losing few seconds every time I am booting. Is there any workaround for this? 

In the hardware, RTC battery backup is provided to keep the RTC running when there is no power. 

My RTC initialisation code is as below 

ssp_err_t err;
rtc_info_t rtc_info;

// Init RTC
err = g_rtc.p_api->open(g_rtc.p_ctrl, g_rtc.p_cfg);
if(err != SSP_SUCCESS)
{
while(1);
}

// Get RTC status
err = g_rtc.p_api->infoGet(g_rtc.p_ctrl, &rtc_info);
if(err != SSP_SUCCESS)
{
while(1);
}

// Get subclock active status
err = g_cgc_on_cgc.clockCheck(CGC_CLOCK_SUBCLOCK);

// If RTC or sub-clock was stopped
if ((rtc_info.status == RTC_STATUS_STOPPED) || (err == SSP_ERR_CLOCK_INACTIVE))
{

printf("\r\nRTC STATUS = %s", rtc_info.status == RTC_STATUS_STOPPED? "Stopped" : "Started");
printf("\r\nSUB CLOCK STATUS = %s", err == SSP_ERR_CLOCK_INACTIVE? "Inactive" : "Active");

// Configure RTC anc clock
err = g_rtc.p_api->configure(g_rtc.p_ctrl, NULL);
if(err != SSP_SUCCESS)
{
err = g_rtc.p_api->configure(g_rtc.p_ctrl, NULL);
if(err != SSP_SUCCESS)
{
while(1);
}
}

// Start the RTC
err = g_rtc.p_api->calendarCounterStart(g_rtc.p_ctrl);
if(err != SSP_SUCCESS)
{
while(1);
}
}

The sub clock status at every boot up is returned as "Inactive".

CGC and RTC settings in my project are as below and I am using SSP version 1.4.1.

 

 

 

Has anyone came around this problem?

Thanks,

Meenanath