Tool/software:
Hi,
I encountered a problem when using RTC on AM623.
the time of the board is 2025, if I set the time point to 2026 and then disconnect the power, the time will be updated after powering on again.
~# date Thu May 15 16:00:04 UTC 2025 ~# hwclock 2025-08-08 08:20:27.177775+00:00 ~# date -s "2026-6-6 6:6:6" Sat Jun 6 06:06:06 UTC 2026 ~# hwclock -w ~# hwclock 2026-06-06 06:06:13.808466+00:00
But if I set the time to 2024, the time of RTC will be restored to the time of 2025 after power off and on.
~# date -s "2024-4-4 4:4:4" Thu Apr 4 04:04:04 UTC 2024 ~# hwclock -w ~# hwclock 2024-04-04 04:04:12.374590+00:00 ~# date Thu Apr 4 04:04:17 UTC 2024
In this case of setting to the past time, the time will be set normally only after reboot or poweroff .
~# date Fri Aug 8 08:09:02 UTC 2025 ~# date -s "2023-3-3 3:3:3" Fri Mar 3 03:03:03 UTC 2023 ~# hwclock -w ~# hwclock 2023-03-03 03:03:10.332103+00:00 ~# date Fri Mar 3 03:03:12 UTC 2023 ~# poweroff
The chip we use is rtc-pcf8563. I saw someone say that for security or system consistency reasons, the RTC driver of some embedded platforms restricts the time from being called back, unless it is in the shutdown process (such as poweroff,reboot).
Is this really the case? Is there a way to write it immediately?