Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
Target Operating System
Linux
Hardware Platform
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)
SDK Manager Version
1.8.3.10426
Host Machine Version
native Ubuntu 18.04
Hello, I am trying to set system time at boot and synch it with AGX A & B using gPTP. I did not connect RTC and internet is enabled in the system.
I now that nv_rtc_sync service runs once at boot and sets the system clock with NTP. It works correctly without gPTP.
When I enable gPTP (AGX-A is master), system clock changes to another date which is not OK.
For AGX-A : sudo ./phc2sys -s /dev/ptp0 -w -S 1.0 -O 0 & sudo ./ptp4l -f ./gPTP.cfg -p /dev/ptp0 -i eth0 -D &
For AGX-B : sudo ./phc2sys -s /dev/ptp0 -w -S 1.0 -O 0 & sudo ./ptp4l -f ./gPTP_slave.cfg -p /dev/ptp0 -i eth0 -D &
These commands synchronize A & B but the system clock changes to another value different then actual time. Also whenever i change the time with ntp to the actual time, after a short time system clock changes again due to gPTP.
From the forum (forum_link), I applied shayNV’s solution which is
For AGX-A: sudo ./phc2sys -s CLOCK_REALTIME -c /dev/ptp0 -w -S 1.0 -O 0 & sudo ./ptp4l -f ./gPTP.cfg -p /dev/ptp0 -i eth0 -D &
For AGX-B: sudo ./phc2sys -s /dev/ptp0 -w -S 1.0 -O 0 & sudo ./ptp4l -f ./gPTP_slave.cfg -p /dev/ptp0 -i eth0 -D &
This helped to obtain the correct date, only if AGX has a working internet. At boot nv_rtc_sync gets the time and changes system clock. After that gPTP does not change the clock and it is all OK. But here we have another problem. Whenever AGX is shut down and power-on later the system clock does not continue. It just starts from the time that it is shutted down until nv_rtc_sync gets the real time from ntp.
How can we change this behaviour?
Regards.