Jetson TK1 does not have a battery backup RTC. Ofcoure time and date can be synchronized with the network. but the problem occurs in the absence of a connection. If you have a little desire, you can make yourself the clock itself.
Requirments:
- The Grinch Custom Kernel 19.3.4 or above
- Dallas DS3231 RTC
- Battery 3V
- Ceramic capacitor 0.1uF
Wiring:
Installation:
- Check DS3231 connection on ic2-1 bus
sudo i2cdetect -y -r 1
You should look address “68”
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
- Attach new device DS3231
echo ds3231 0x68 | sudo tee /sys/class/i2c-dev/i2c-1/device/new_device
If succesfully, module “rtc_ds1307” will be loaded and device /dev/rtc1 will be created:
lsmod
Module Size Used by
rtc_ds1307 10881 0
ls /dev/rtc*
/dev/rtc /dev/rtc0 /dev/rtc1
- Set proper date and time (if required)
sudo date --set "2014-8-21 23:00:00"
- Store date and time in rtc1 (DS3231)
sudo hwclock -w -f /dev/rtc1
You can read current time from DS3231 now to check is writed correctly:
sudo hwclock -r -f /dev/rtc1
Thu 21 Aug 2014 11:01:38 PM UTC -0.434869 seconds
- Add to /etc/rc.local two lines:
echo ds3231 0x68 | sudo tee /sys/class/i2c-dev/i2c-1/device/new_device
sudo hwclock -s -f /dev/rtc1
- Reboot! You have battery backup RTC clock
RECOMMENDED OPTIONAL STEPS
You have two RTC clocks /dev/rtc0 (rtc_as3722) and /dev/rtc1 (rtc_ds1307). Strongly recommended is disable rtc0 and make rtc1 as default clock.
- Add rtc_as3722 module to blacklist in /etc/modprobe.d/blacklist.conf
blacklist rtc_as3722
- Modify /etc/rc.local script to use rtc0 (after reboot, ds3231 will be default one RTC clock)
line:
sudo hwclock -s -f /dev/rtc1
replace to:
sudo hwclock -s -f /dev/rtc0
and roboot.