Within MQX you are looking for the function '_rtc_init' in krtc.c, on a path similar to this:
C:\Projects\IforceV4\MCP\MQX_RTOS\mqx\source\io\rtc\krtc.c
My MQX code has this:
rtc->CR = RTC_CR_SC8P_MASK | RTC_CR_OSCE_MASK;
which is setting only the 8p capacitor. If your hardware crystal is a 12.5pf part, I find that l need the SC4P and SC16P settings both enabled, and with that I get about 10ppm 'fast' at room temp 25C (1s/day), 10ppm 'slow' at 5 or 45C. The crystal I use is ABS07-32.768KHZ-1-T, which has an initial accuracy +/-10ppm yet is small & inexpensive.
I don't use the TCR function (set to 0) as we use the 32.768KHz 'count' register to approximate millisecond-level timestamping in _rtc_get_time:
| time->MILLISECONDS = (rtc->TPR*1000 + 16384)/32768; | //Round crystal counts to milliseconds |
And in any case that only helps if you are going to (periodically) read temperature, and knowing the TCR curve of such tuning-fork crystals attempt to adjust.
And yes, all RTC control registers are held 'valid' by the RTC battery voltage.
BTW I recommend timeanddate.com for your synchronization reference.