Hi, we are using an official NX board and want to use the built-in RTC function.
We placed a battery holder on J3 of the carrier board, and use a CR1220 battery.
We get the following results:
Before poweroff time is: 2022-10-23 13:00:00,
then poweroff for 1 hour,
After poweron, the time is still: 2022-10-23 13:00:00
The RTC keeps the last time but not working during the poweroff period.
Do you know why? Does it need any software configurations or any hardware modifications? Thanks!
there’re two RTCs, may I know which one you’re using?
please use rtc1 as the primary RTC, it is the RTC module inside the chip. please see-also [RTC] in Xavier TRM for details.
Hi, we are using rtc1, as the /dev/rtc link to /dev/rtc1
and use these commands:
sudo timedatectl set-local-rtc 0
sudo timedatectl set-local-rtc 1
sudo -s date “10/22/2022 10:30:30”
sudo hwclock -w -f /dev/rtc1
sudo hwclock -r -f /dev/rtc1
Please read the questions first,
Before poweroff time is: 2022-10-23 13:00:00,
then poweroff for 1 hour,
then poweron, the time is still: 2022-10-23 13:00:00
This time it should be 14:00:00 instead of 13:00:00
Did you measure the voltage level of CR1220 to make sure it can work well? And is the D4 (diode) mounted on your carrier board, as the BBAT supply will be cut off if D4 is not mounted.
Please try to read the date directly from rtc clock and tell us if that also does not meet your expectation or not…
If this is also not correct, then need to check what Trumany said.
Hi Trumany,
D4 is mounted, and we only add the battery holder to the board, don’t make any other changes.
If we remove the battery, the time will reset to the original one like 1970 instead of last power off time, so compare the two different results, we think the battery is working.
We will measure the voltage level of the battery and reply to you later.