Internal RTC Time is reset

Colibri Evaluation Board V3.2
Colibri iMX6ULL 1GB IT

The internal RTC seems to be normal.
However, the time is reset when the hwclock is set and the Power is turned off and on.

  1. hwclock setup
    root@colibri-imx6ull-emmc-15161328:~# date -s “2013-11-19 15:11:40”
    Tue Nov 19 15:11:40 KST 2013
    root@colibri-imx6ull-emmc-15161328:~# hwclock -w
    root@colibri-imx6ull-emmc-15161328:~# hwclock -r
    Tue Nov 19 15:11:44 2013 0.000000 seconds

  2. Power off → on
    dmesg after rebooting
    root@colibri-imx6ull-emmc-15161328:~# dmesg | grep rtc
    [ 1.838894] snvs_rtc 20cc000.snvs:snvs-rtc-lp: registered as rtc0
    [ 1.851152] snvs_rtc 20cc000.snvs:snvs-rtc-lp: setting system clock to 1970-01-01T00:00:00 UTC (0)

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!


I see you’re experiencing issues with the RTC on a Colibri iMX6ULL module where the time resets after power cycling, despite setting it correctly beforehand.

This behavior typically indicates that the RTC battery is either not present, not charged, or not properly connected. The i.MX6 ULL SoC relies on an external battery to maintain the RTC clock when the power is off. Here are a few steps to troubleshoot and potentially resolve the issue:

  1. Check the Battery Connection: Ensure that the battery used to back up the RTC is properly connected to the Colibri Evaluation Board V3.2. The connection should be secure and the battery orientation correct.

  2. Verify Battery Health: Test the battery to ensure it’s not depleted. Even new batteries can sometimes be near the end of their shelf life. Replace the battery if necessary.

  3. Inspect for Board Damage: Look for any signs of damage or wear on the board that might affect the RTC circuitry, including the battery holder and connections.

  4. Review Board Documentation: Ensure that the setup for the RTC battery is in accordance with the Colibri Evaluation Board V3.2 documentation. There might be specific requirements or settings for the RTC to function properly.

  5. Software Configuration: Double-check the software configuration related to the RTC. Ensure that the correct drivers are loaded and that there are no conflicting settings. Given the context, it seems the correct driver (snvs_rtc) is loaded, but it’s worth revisiting the configuration.

  6. Linux Kernel and U-Boot: Ensure that both the Linux kernel and U-Boot are configured correctly to support the RTC. There might be settings in U-Boot that affect how the RTC is initialized and maintained across reboots.

  7. Testing with a Different Power Source: If possible, test with a different power source or in a different power configuration to rule out any issues related to power supply instability.

If after these steps the RTC still fails to maintain time across power cycles, it might indicate a more complex issue with the hardware or a deeper software configuration problem that requires a closer examination of the system logs and configurations.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Real-Time Clock / RTC (Linux) | Toradex Developer Center.

How did you like my response?

:+1: :-1:

Please ensure that a fresh and good-quality CR2032 battery is installed in the battery holder located near the SOM. Note that some no -name or counterfeit batteries may not provide sufficient energy, even if they are new.
Also, please specify the OS image version you are using.

CR2032 is a new battery, with 3.3V voltage measured across the holder.
And, I added it to the device tree as below.
aliases {
rtc0 = &snvs_rtc;

&snvs_rtc {
status = "okay";

yocto version is like below.
TDX Wayland with XWayland Upstream 6.5.0-devel-20240507060033+build.0 (kirkstone) 

root@colibri-imx6ull-emmc-15161328:~# ls -al /dev/rtc*
lrwxrwxrwx    1 root     root             4 Apr 29 02:42 /dev/rtc -> rtc0
crw-------    1 root     root      253,   0 Apr 29 02:42 /dev/rtc0

The snvs_rtc is an internal iMX6Ull RTC (I apologize for not catching this from your first post). This RTC is powered by the VCC_BATT (pin 40) supply. To ensure this pin is supplied from the coin battery, the JP23 jumper should be set to connect pins 1 and 2 together.