NVIDIA Tegra
NVIDIA DRIVE OS 5.1 Linux SDK

Developer Guide
5.1.9.0 Release


 
CAN Realtime Clock
 
Connecting the RTC Module
Obtaining and Setting the System Time
Consult the Release Notes to identify the supported boards for the release.
On E3550 or P2888 board:
The E3550 and P2888 board includes a CAN Real-Time Clock (RTC) module computer clock to accurately track time. Use the canrtc.sh script to set the RTC module initially to the correct time. The process of setting the module to the correct time, requires:
Obtaining the correct time from the target system.
Setting the correct time in the RTC module.
If the target system is already set to the correct time, then simply set the correct time on the RTC module.
Additionally, the RTC module can be set to automatically set the correct time whenever the platform is booted up.
Connecting the RTC Module
Before getting or setting the RTC module correct time, plug the module into cable harness connector labelled CAN_6_4.
For details on the cable harness connections for the E3550 board, consult Setting Up Your E3550 Platform, Cable Harness topic.
Obtaining and Setting the System Time
Use the canrtc.sh script to obtain, or get, the system time, and then set the time in the RTC module.
To get the system time
On Linux
Use bash shell to launch the canrtc.sh script and get the time as follows:
sudo bash /usr/local/sbin/canrtc.sh get
To set the system time
On Linux
Use bash shell to launch the canrtc.sh script and get the time as follows:
sudo bash /usr/local/sbin/canrtc.sh set
To automatically set the system time at boot
On Linux
If the network is available, run the /etc/systemd/scripts/nv_rtc_sync.sh script at boot to set the system time from the network.
If the network is NOT available, set the system time from the dongle.