Developer Guide Release

Time Synchronization between MCU and the SoC Using gPTP
The gPTP protocol must be used for time synchronization between the SoC and MCU. 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, MCU 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.
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 the platform, the supported configuration is:
MCU serves as Global Time Master
The SoC serves as the Time Slave
To initiate a PTP synchronization between MCU and the SoC
1. In the MCU 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:
For example:
date 0x77DA7A8F
2. Enable gPTP on MCU:
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
ptpd-avb -gCKLb eq0
4. Verify the date on the SoC to ensure that the MCU and the SoC time are synchronized.