Based on platform documentation, the Aurix can act as master clock in a PTP configuration to synchronize timestamps of Tegras and other connected sensors/devices. Now, I am wondering how to setup the source time in the Aurix to the UTC time and PPS signal that can be obtained from a GNSS.
Is the Aurix configurable for that extent? Could somebody provide some references?
Could you please try to set up below to set system time?
============================================
Time Sync (hardware sync your system to a universal time, for example UTC/GMT)
Step 1 : Boot the target and connect to Aurix from putty or minicom. Set Aurix time (Note: Aurix needs Unix Hex time, you can get current Unix Hex time from Unix Hex Timestamp Converter)
Shell> date 0x5881877A
Check if the command took effect.
Shell> date
0x5881877B
Step 2 : start ptp service from Aurix console
Shell> gptpon
Step 3 : change time zone on target to GMT (click the time string on the upper right corner of your desktop, and change time zone to GMT. Double check with linux command: date)
nvidia@tegra-ubuntu:~$ date
Sun Feb 14 14:50:02 GMT 2016
Step 4 : stop NTP service and sync target time to Aurix time on target
nvidia@tegra-ubuntu:~$ sudo timedatectl set-ntp 0
nvidia@tegra-ubuntu:~$ cd /home/nvidia/vibrante-t186ref-linux/samples/nvavb/daemons
Thank you SteveNV.
Tried the above and successfully set up the system time.
From your suggestion, I guess that phc2sys and ptp4l can be tweaked in parameters to capture other synchronizing devices like an external GNSS. I’ll try that at some point in time.
This is a nice feature! The best would be however if the Aurix can get NMEA and PPS from the GPS unit to get its clock synced and then enable also the existing PTP of course. :)
I tried to follow the instructions from SteveNV as good as possible but ptp4l replies ‘delay timeout’.
Any hint, what I missed or were the error comes from?
Here the more detailed output of ptp4l:
sudo ./ptp4l -f gPTP.cfg -p /dev/ptp0 -i eth0 -s -m -D -l 7
ptp4l[2003.965]: selected /dev/ptp0 as PTP clock
ptp4l[2003.966]: PI servo: sync interval 1.000 kp 0.700 ki 0.300000
ptp4l[2003.966]: port 1: get_ts_info not supported
ptp4l[2003.992]: port 1: INITIALIZING to LISTENING on INITIALIZE
ptp4l[2003.992]: port 0: INITIALIZING to LISTENING on INITIALIZE
ptp4l[2004.042]: port 1: setting asCapable
ptp4l[2004.043]: port 1: new foreign master e3a08d.fffe.4b0400-1
ptp4l[2004.211]: port 0: setting asCapable
ptp4l[2004.442]: selected best master clock e3a08d.fffe.4b0400
ptp4l[2004.443]: running in a temporal vortex
ptp4l[2004.443]: port 1: LISTENING to UNCALIBRATED on RS_SLAVE
ptp4l[2004.492]: port 1: delay timeout
ptp4l[2004.992]: port 1: delay timeout
ptp4l[2005.492]: port 1: delay timeout
ptp4l[2005.992]: port 1: delay timeout
ptp4l[2006.492]: port 1: delay timeout
Hello, did anyone else had this problem? Any hints to solve this? I have this problem even with the actual SW versions (DriveInstall 5.0.5.0aL, Driveworks 0.6, …)
I found my problem: On the Drive-PX2 one should use the eth0.200 port at the ptp4l command. Then, a synchronization between the AURIX and the Tegra is possible. But the Aurix forget his time on every reboot. Is there a way for the AURIX to keep his time relative to the world-time?