System clock setting and gPTP

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

Hardware Platform
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)

SDK Manager Version

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?


Without the RTC dongle, it will get the real time from NTP after nv_rtc_sync. What issue do you want to address?

My issue is that, after power-off system somehow freezes the system time and after power-on the system time is the same as at the moment of power-off. Seems like it stores the time at shut down and again sets the stored time after a power-on. When there is no internet in the system, system time is completely wrong in case of power off/ons. Can we disable this feature in AGX?

Without RTC and the internet, isn’t incorrect system time reasonable? Could you elaborate what’s your real concern?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.