I have already installed several Jetson Nano SBCs and have come to appreciate the small computer for training neural networks. So I have already built two donkey cars for myself that can drive autonomously. For my employer I have already built four donkey cars for an internal training and these have been used in trainings at different locations. One problem I always have with my donkey cars is that the date and time are not correct if the operating system could not get them over an internet connection. Often the donkey cars don’t have access to a time server over the internet during trainings or outdoors and the Jetson Nano doesn’t have a real time clock that works automatically.
Therefore I would like to operate a Real Time Clock (RTC) on the Jetson Nano. The following picture shows the Donkey Cars I have already built based on the Jetson Nano.
Jetson Nano Real Time Clock (RTC)
There are now various possibilities to equip the Jetson Nano with a Real Time Clock. One is, for example, as is typical for the Raspberry Pi, to connect an RTC to the GPIO header. But as far as I could read in the NVIDIA developer forum the Jetson Nano already has a built in Real Time Block, only the battery is missing on the board to supply it with power when the Jetson Nano is switched off.
Here you can find the corresponding comment in the developer forum: forums.developer.nvidia.com
So I bought 10 holders for CR1225, CR1220 or CR1216 batteries at Ali Express, because I want to convert six donkey cars and own a Jetson Nano for testing.
On this Jetson Nano I would like to attach the holder for the battery first. If you turn the Jetson Nano board around you will see the soldering points for the battery holder on the backside. You can also see the imprint on the board how exactly the battery holder has to be soldered on.
In the second part (NVIDIA Jetson Nano Real Time Clock (RTC) – Part 2) I show how to solder the holder on the back of the Jetson Nano Board.
I found your post and decided to try it on the dev board that I just purchased. After soldering RTC battery holder and inserting CR1225 battery, I booted with the latest L4T created with the sdk manager. This bord is connected to the network so system time is synced automaticly soon after.
I can see two RTC clocks in the kernel log
[ 0.580246] vdd-rtc: 850 1100 mV at 1000 mV
[ 0.616673] camchar: rtcpu character device driver loaded
[ 1.693318] max77686-rtc max77620-rtc: rtc core: registered max77620-rtc as rtc0
[ 1.695787] rtc rtc1: alarm rtc device
[ 1.695809] tegra_rtc 7000e000.rtc: rtc core: registered 7000e000.rtc as rtc1
[ 1.695840] tegra_rtc 7000e000.rtc: Tegra internal Real Time Clock
[ 1.916831] tegra_rtc 7000e000.rtc: setting system clock to 2000-01-01 01:00:16 UTC (946688416)
Here is timedatectl after booting without any modification
Local time: Tue 2020-11-24 20:47:53 CST
Universal time: Wed 2020-11-25 01:47:53 UTC
RTC time: Sat 2000-01-01 01:07:26
Time zone: America/New York (CST, -0500)
System clock synchronized: no
systemd-timesyncd.service active: yes
RTC in local TZ: no
Now if I query each RTC by running
sudo hwclock -r -f /dev/rtc0 or
sudo hwclock -r -f /dev/rtc1
I get the year 1999
Next, I force rtc0 from system time and run timedatectl again.
I see RTC time did not change.
Next, I update rtc1 from system time using sudo hwclock -w -f /dev/rtc1 and run timedatectl again.
Now I see RTC is changed and looks correct.
Next, I shutdown Nano, disconnect all cables from it leaving it for 30 min or so unplugged.
Next, I boot up with a disconnected Ethernet cable. (I log in through UART since running headless)
Now I check timedatectl or reading each rtc0 or erc1 device and I see then set back to 1999
Any ideas? Did you do anything additional? I did check the battery. It is brand new from the store. I also checked with a voltmeter. It was ~3.1V
I have Nvidia Development board B revision.