After looking over the RTC driver in the WEC2013 BSP, it looks like it's trying to read from some registers on the SNVS register that I cannot find documentation on:
// LPSCMR is only valid when two consecutive reads
// return the same result
do
{
time.LowPart = INREG32(&g_pSNVS->LPSRTCLR); //offset 0x054
time.HighPart = INREG32(&g_pSNVS->LPSRTCMR); //offset 0x050
} while (time.LowPart != INREG32(&g_pSNVS->LPSRTCLR));
// RTC is clocked with 32.768 kHz, so the SNVS LP counter
// starts counting seconds in bit 16 and higher
// for sub one second accuracy preserve the lower 15 bit
// and convert them separately
subSecond.QuadPart = time.QuadPart & 0x7FFF;
subSecond.QuadPart = subSecond.QuadPart * 10000000;
subSecond.QuadPart = subSecond.QuadPart >> 15;
// Convert raw RTC ticks into seconds
time.QuadPart = time.QuadPart / 32768;
// Convert seconds into FILETIME ticks
// FILETIME tick = 100 nsec = 1e-7 sec
time.QuadPart = time.QuadPart * 10000000;
// Add contribution of lower 15 bits
time.QuadPart += subSecond.QuadPart;
// Add RTC offset to the time origin
time.QuadPart += g_oalRtcOriginTime.QuadPart;
// Reformat to FILETIME
ft.dwLowDateTime = time.LowPart;
ft.dwHighDateTime = time.HighPart;
// Convert to SYSTEMTIME
NKFileTimeToSystemTime(&ft, lpst);
rc = TRUE;
Any ideas as to what these registers might be doing?