How to set Aurix time on px2

I followed the Aurixcan setup guide and now the Aurix works well. But I still have a question about the time sync. As https://devtalk.nvidia.com/default/topic/1031778/faq/nvidia_drive_px2_time_sync_guide/ said, we can set Aurix time through Aurix console, but every time px2 reboot the aurix time change and the time was wrong, so we need set aurix time again through aurix console. I think it is not convenient and unreasonable. Can we set aurix time just on px2, no need aurix console?

Dear yxiang,

Could you please refer to below for your topic? Thanks.

  1. Disable ntp (network time protocol)
    tegra-a@nvidia:~ sudo timedatectl set-ntp 0 tegra-b@nvidia:~ sudo timedatectl set-ntp 0

  2. set time in Aurix and run gPTP (precison time protocol)
    shell> data 0x77DA7A8F
    shell> gptpon

  3. Run phc2sys & ptp4l on Tegra A/B

tegra-a@nvidia:~ cd /home/nvidia/drive-t186ref-linux/samples/nvavb/daemons tegra-a@nvidia:~ sudo ./ptp4l -f ./gPTP_slave.cfg -p /dev/ptp0 -i eth0.200 -D -l 7 &
tegra-a@nvidia:~$ sudo ./phc2sys -s /dev/ptp0 -w -S 1.0 &

Please run below to verify phc clock

tegra-a@nvidia:~$ sudo ./phc_ctl /dev/ptp0 get

tegra-a@nvidia:~$date

  1. Save the setting

//for Tegra A
tegra-a@nvidia:~ sudo systemctl enable nv_phc2sys tegra-a@nvidia:~ sudo systemctl start nv_phc2sys
tegra-a@nvidia:~ sudo systemctl enable nv_ptp4l tegra-a@nvidia:~ sudo systemctl start nv_ptp4l

//for Tegra B
tegra-b@nvidia:~ sudo systemctl enable nv_phc2sys tegra-b@nvidia:~ sudo systemctl start nv_phc2sys
tegra-b@nvidia:~ sudo systemctl enable nv_ptp4l tegra-b@nvidia:~ sudo systemctl start nv_ptp4l

  1. Please run gptpon on Aurix Console

Shell>gptpon

  1. If you want to change the PTP setting that was automatically set at boot time to NTP, follow the steps below

//for Tegra A
tegra-a@nvidia:~ sudo systemctl disable nv_phc2sys tegra-a@nvidia:~ sudo systemctl stop nv_phc2sys
tegra-a@nvidia:~ sudo systemctl disable nv_ptp4l tegra-a@nvidia:~ sudo systemctl stop nv_ptp4l
tegra-a@nvidia:~$ sudo timedatectl set-ntp 1

//for Tegra B
tegra-b@nvidia:~ sudo systemctl disable nv_phc2sys tegra-b@nvidia:~ sudo systemctl stop nv_phc2sys
tegra-b@nvidia:~ sudo systemctl disable nv_ptp4l tegra-b@nvidia:~ sudo systemctl stop nv_ptp4l
tegra-b@nvidia:~$ sudo timedatectl set-ntp 1

Hi SteveNV,
Thanks very much.
I will try this.