G120HDR RTC Gains Time During 24 Hour Period

I’ve got a system running with a G120HDR and over a 24 hour period the RTC will run fast. My app uses a timer to display the time and if I set the RTC, reboot the system and don’t anything to the system except leave it run the RTC will actually gain 2 to 3 minutes over a 24 hour period of time. If I set the local time with the RTC and display the DataTime.Now it too will actually gain about 6 minutes in a 24 hour period of time. I’ve checked the RTC crystal on the board with a scope and it is running at ~32.76khz. My scope bounces a bit between 32.68 and 32.86khz so I can’t get a super accurate reading. So what could cause the time to advance?

First, there is the accuracy/tolerance of the crystal. Second, the crystal is not in a regulated environment. Temperature will effect accuracy.

If you want really accurate time, use GPS.

@ csailor - The RTC hardware supports calibration. You can load the calibration registers with a value to adjust the clock automatically. This is described in the MCU datasheet.

Can anyone elaborate on these timing adjustments please. I have custom G120 device using this crystal and these 22pf caps.

http://www.digikey.com/product-detail/en/ABS07-32.768KHZ-T/535-9542-6-ND/1624263

http://www.digikey.com/product-detail/en/samsung-electro-mechanics-america-inc/CL31C220JBCNNNC/1276-1203-1-ND/3889289

My clock gains ~15seconds a day. If there are no software offsets. Can I tune the hardware some how?

Thanks in advance.

Doubt it but take a look at the LPC1788 datasheet from nxp please.