Set system time in Aurix and GNSS synchronization

Hi,

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?

thanks in advance.

Hello jyebes,

any news or progress on this?

Thanks!

No news in this regard, sorry.

Thanks! To bad though… :( That’s a nice feature to have actually…

Dear all,

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 http://www.epochconverter.com/hex)

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

nvidia@tegra-ubuntu: /home/nvidia/vibrante-t186ref-linux/samples/nvavb/daemons$ sudo ./phc2sys -s /dev/ptp0 -w &

nvidia@tegra-ubuntu:/home/nvidia/vibrante-t186ref-linux/samples/nvavb/daemons$ sudo ./ptp4l -f ./gPTP.cfg -p /dev/ptp0 -i eth0 -s -m -D -l 7


Step 5 : review the time setting on target

After 2-3 minutes, terminate the ptp4l application by enter CTRL-C and enter the following command to show HW timestamp

nvidia@tegra-ubuntu:/home/nvidia/vibrante-t186ref-linux/samples/nvavb/daemons$ sudo ./phc_ctl /dev/ptp0 get

Show Linux system time

nvidia@tegra-ubuntu:/home/nvidia/vibrante-t186ref-linux/samples/nvavb/daemons$ date

Hello, SteveNV

Is it possible to set the system time of Aurix only on the Aurix console?
Is there any other way to set it?

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.

Thanks for the input SteveNV!

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. :)

Hello,

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?

Hi jyebes, have you ever tried syncing Aurix to GPS time and provided PPS signal?

I spent some time with previous version of DrivePX2 but I have not done anything on that line recently.

GNSS synchronization via PPS would be an important feature we also would be interested in.

Hello jyebes,
Have you ever tried to sync Aurix/Tegra’s time to GPS time, and does it work?
Thanks a lot!