RTC Not Working

Hi,

I’m trying to use the RTC battery on my orin to keep timing when I’m not connected to the internet. It doesn’t seem to be working. I’ve followed all the instructions outlined here:

https://forums.developer.nvidia.com/t/agx-orin-rtc-not-working-after-rebooting-it-is-starting-with-21-april-2022/237347

but, when I run ‘sudo hwclock verbose’ I’m still seeing the following output:

hwclock from util-linux 2.34
System Time: 1713473519.216770
Trying to open: /dev/rtc0
Using the rtc interface to the clock.
Last drift adjustment done at 1713472833 seconds after 1969
Last calibration done at 1713472833 seconds after 1969
Hardware clock is on UTC time
Assuming hardware clock is kept in UTC time.
Waiting for clock tick...
hwclock: select() to /dev/rtc0 to wait for clock tick timed out
...synchronization failed

Do you have any other suggestions to see what may be going on?

Thanks!

Hi bh4216la,

Are you using the devkit or custom board for AGX Orin?
What’s your Jetpack version in use?

Please share the full dmesg for further check.
and also check if the following topic could help for your case.
AGX Orin: rtc0 vs rtc1 - Jetson & Embedded Systems / Jetson AGX Orin - NVIDIA Developer Forums
Jetson Orin Nano RTC using a battery not working - Jetson & Embedded Systems / Jetson Orin Nano - NVIDIA Developer Forums

Hi @KevinFFF,

I did do the steps that both of those links outline, and am still running into this issue. I am not using a dev kit. I am not sure of the Jetpack version, but the contents of /etc/nv-tegra-release are:

R35 (release), REVISION: 1.0, GCID: 31250864, BOARD: t186ref, EABI: aarch64, DATE: Thu Aug 11 03:40:29 UTC 2022

Please let me know if there is any other information that I can provide that would be helpful.

I ran the command ‘sudo dmesg | grep rtc’ and this was what was returned:

[    1.653763] camchar: rtcpu character device driver loaded
[    4.251938] tegra_rtc c2a0000.rtc: registered as rtc1
[    4.257139] tegra_rtc c2a0000.rtc: Tegra internal Real Time Clock
[    4.389669] nvvrs-pseq-rtc nvvrs-pseq-rtc: registered as rtc0
[    4.397158] nvvrs-pseq-rtc nvvrs-pseq-rtc: setting system clock to 2024-04-19T01:22:00 UTC (1713489720)
[    5.718462] tegra186-cam-rtcpu bc00000.rtcpu: Adding to iommu group 7
[    5.735256] tegra186-cam-rtcpu bc00000.rtcpu: Trace buffer configured at IOVA=0xbff00000
[    5.771085] tegra-ivc-bus bc00000.rtcpu:ivc-bus: region 0: iova=0xbfec0000-0xbfee01ff size=131584
[    5.780274] tegra-ivc-bus bc00000.rtcpu:ivc-bus:echo@0: echo: ver=0 grp=1 RX[16x64]=0x1000-0x1480 TX[16x64]=0x1480-0x1900
[    5.791700] tegra-ivc-bus bc00000.rtcpu:ivc-bus:dbg@1: dbg: ver=0 grp=1 RX[1x448]=0x1900-0x1b40 TX[1x448]=0x1b40-0x1d80
[    5.803499] tegra-ivc-bus bc00000.rtcpu:ivc-bus:dbg@2: dbg: ver=0 grp=1 RX[1x8192]=0x1d80-0x3e00 TX[1x8192]=0x3e00-0x5e80
[    5.815125] tegra-ivc-bus bc00000.rtcpu:ivc-bus:ivccontrol@3: ivccontrol: ver=0 grp=1 RX[64x320]=0x5e80-0xaf00 TX[64x320]=0xaf00-0xff80
[    5.827701] tegra-ivc-bus bc00000.rtcpu:ivc-bus:ivccapture@4: ivccapture: ver=0 grp=1 RX[512x64]=0xff80-0x18000 TX[512x64]=0x18000-0x20080
[    5.840533] tegra-ivc-bus bc00000.rtcpu:ivc-bus:diag@5: diag: ver=0 grp=1 RX[1x64]=0x20080-0x20140 TX[1x64]=0x20140-0x20200
[    5.852554] tegra186-cam-rtcpu bc00000.rtcpu: using cam RTCPU IRQ (117)
[    5.859386] tegra186-cam-rtcpu bc00000.rtcpu: tegra_camrtc_mon_create is successful
[    5.868692] tegra186-cam-rtcpu bc00000.rtcpu: firmware version cpu=rce cmd=6 sha1=7a10e4613e151d2bf1df37dd80d456800f5b94d0

Thanks!

It seems you are using R35.1 which is an old release.
Is this custom carrier board designed by you?
Do you have the chance to update it into the latest R35.5.0?

Please also share the result of the following command on your board.

 $ zcat /proc/config.gz | grep CONFIG_RTC_HCTOSYS_DEVICE 

Yes, this is a custom carrier board.

The output of that command is:

CONFIG_RTC_HCTOSYS_DEVICE="rtc0"

This is a known issue that resolved long time ago. Your BSP is too old.

Hi @WayneWWW,

I understand that this problem has been solved in newer BSPs, but am unfortunately not able to update to a newer BSP version at this time. But, it looked like in the link I posted (https://forums.developer.nvidia.com/t/agx-orin-rtc-not-working-after-rebooting-it-is-starting-with-21-april-2022/237347), they were able to resolve this issue by updating tegra_defconfig (marked as the solution on that post that I linked) and recompiling the kernel, which is what we did. So it sounded like it was possible to use this tegra_defconfig fix with older BSPs to use the RTC. Is that not the case?

Thanks.

Do you follow every steps in the linked post? (i.e. do you also update udev rule?)

Please share the result of the following command on your board.

$ ls -l /dev/rtc*

Not the case. Modifying tegra_defconfig won’t fix “hwclock: select() to /dev/rtc0 to wait for clock tick timed out”

2 Likes

Hi @KevinFFF,

Yes, I did follow the steps posted to that link. The output of that command is:

lrwxrwxrwx 1 root root 4 Apr 21 21:22 /dev/rtc → rtc0
crw------- 1 root root 250, 0 Apr 21 21:22 /dev/rtc0
crw------- 1 root root 250, 1 Apr 21 21:22 /dev/rtc1

What issue are those steps supposed to resolve?

Thanks.

That step is to resolve the issue that your RTC time will be reset in each reboot.

Hi @WayneWWW,

So we updated the tegra_defconfig file and update the udev rule. But, we noticed that when we reboot the RTC time was getting reset, so we tried to run ‘sudo hwclock --systohc’ and ran into this issue with the timeout.

What BSP did this issue get solved in?

rel-35.3.1 shall resolve this. But you can just upgrade to latest in case I didn’t remember it correctly.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.