Real Time Clock "OLIMEX" A20-OLinuXino-LIME2-e16Gs16M

Started by Starkafan, April 25, 2024, 07:57:23 AM

Previous topic - Next topic

Starkafan

I connect battery 3V to BACKUP contacts near with LAN connector (net AXP_BACKUP, connected to U13:30, IC AXP209)

I synchronized the time in the evening with my work computer at 16:22.
Turned off Olimex.
In the morning, Olimex time is 07:10, and the time on the work computer is 06:59. Difference 11 minutes.

Why might this happen?

But when Olimex is turned on, every 10 minutes the clock lags by about 14 seconds.

If I'am run my program and every second execute command "hwclock -w" (set hardware clock from system time), the clock stops slowing down. The clock speeds up by about 6 seconds every half hour.

LubOlimex

Probably wrong clock source selected. Internal is not that accurate.
Technical support and documentation manager at Olimex

Starkafan

Quote from: LubOlimex on April 25, 2024, 11:17:53 AMProbably wrong clock source selected. Internal is not that accurate.

Now in the config file:
...
# CONFIG_SPL_RTC_SUPPORT is not set
...
# CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC is not set
...
#
# Real Time Clock
#
# CONFIG_DM_RTC is not set
# CONFIG_RTC_PL031 is not set
# CONFIG_RTC_S35392A is not set
# CONFIG_RTC_MC146818 is not set
# CONFIG_RTC_M41T62 is not set
...

How can I change it so that RTC works correctly?

LubOlimex

Default clock can be changed from  /etc/udev/rules.d/ if I remember correct.

I will see if we can measure the RTC of few boards to see if there is something shady.

If it is important to be accurate, maybe consider external RTC as a workaround. I know few people had used MOD-RTC or MOD-RTC that works over I2C: 

https://www.olimex.com/Products/Modules/Time/MOD-RTC2/open-source-hardware
Technical support and documentation manager at Olimex