NVIDIA Tegra
NVIDIA DRIVE OS 5.1 Linux SDK

Developer Guide
5.1.9.0 Release


 
Time Synchronization between Aurix and the SoC Using gPTP
The gPTP protocol must be used for time synchronization between the SoC and AURIX. gPTP is part of the Audio Video Bridging (AVB) Standard: IEEE 802.1AS: Timing and Synchronization for Time-Sensitive Applications (gPTP).
On the platform, gPTP over Ethernet is used for time synchronization. However, AURIX uses AUTOSAR Modules for the time synchronization.
For gPTP, the EthTSyn Module and the StbM Module are used. The Synchronized Time Base Manager (StbM) provides the Time base.
On Linux:
The gPTP Protocol is handled by an adapted version of the program linuxptp, also known as ptp4l and the program phc2sys to synchronize the system clock.
On QNX:
Master: ptpd-avb -CWKLb eq0
Slave: ptpd-avb -CgKLb eq0
On the platform, the supported configuration is:
AURIX serves as Global Time Master
The SoC serves as the Time Slave
C:\Users\hlang\AppData\Local\Temp\SNAGHTMLe01b3c2.PNG
To initiate a PTP synchronization between AURIX and the SoC
1. In the AURIX console, enter the date <time>.
Where <time> is in UNIX-style seconds.
To convert Hex time to Epoch, use Epoch-Unix Time stamp convertor available at:
https://www.epochconverter.com/
For example:
date 0x77DA7A8F
2. Enable gPTP on AURIX:
gptpon
3. On the SoC enter these commands:
On Linux:
For Single Slave (Either Xavier-A or Xavier-B)
timedatectl set-ntp 0
./phc2sys -s /dev/ptp0 -w -S 1.0 -O 0 &
./ptp4l -f ./gPTP_slave.cfg -p /dev/ptp0 -i eth0 -m -l 7
For Dual Slave (Both Xavier-A and Xavier-B together)
timedatectl set-ntp 0
./phc2sys -s /dev/ptp0 -w -S 1.0 -O 0 &
./ptp4l -f ./gPTP_slave.cfg -p /dev/ptp0 -i eth0 -m -l 7 -D
On QNX:
ptpd-avb -gCKLb eq0
4. Verify the date on the SoC to ensure that the AURIX and the SoC time are synchronized.