Sync GMSL cameras via PTP from ETH0


how to synchronize the GMSL camera by a PTP clock coming from ETH0?

On Xavier A and Xavier B we have a PTP slave running using “/usr/sbin/ptpd -c /etc/ptpd2.conf”

The /etc/ptpd2.conf has following settings:

; interface has to be specified

; PTP domain

; available presets are slaveonly, masteronly and masterslave (full IEEE 1588 implementation)

; multicast for both sync and delay requests - use hybrid for unicast delay requests

; when enabled, sniffing is used instead of sockets to send and receive packets

; log file, event log only. if timing statistics are needed, see statistics_file

; status file providing an overview of ptpd's operation and statistics

Using wireshark we see the PTP messages exchanged and using date we see the Xavier’s clock in sync with host PC.

The dwImage_getTimestamp() timestamps from GMSL cameras look pretty weak with high jitter.


[25-11-2021 17:56:39] TimeSource: Could not detect valid PTP time source at nvpps. Fallback to eth0
[25-11-2021 17:56:39] TimeSource Eth: Lost PTP time synchronizaton. Synchronized time will not be available from this timesource.
[25-11-2021 17:56:39] TimeSource: Could not detect valid PTP time source at 'eth0'. Fallback to CLOCK_MONOTONIC.

How to sync the GMSL cameras?

GMSL camera sync uses an external trigger and GMSL cameras are connected to one group, only. We like to use PTP via ETH0 as source clock and use all groups.

We tried the recommendation from What's the GlobalTimeStamp

./phc2sys -s /dev/ptp0 -w -S 1.0 -O 0 &
./ptp4l -f ./gPTP_slave.cfg -p /dev/ptp0 -i eth0 -m

but how to specify ETH0 as the clock source ?

Thanks for your support

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.6 and DriveWorks 4.0
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version

Target Operating System

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)

SDK Manager Version

Host Machine Version
native Ubuntu 18.04

Dear @andreas.schwager,
The dwImage_getTimestamp() timestamps from GMSL cameras look pretty weak with high jitter

Could you provide more details on this.

Also, may I know why you are looking for this use case?

Dear SivaRamaKrishnaNV,

we expect the timestamps received from images to be equidistant and constant over a very long time. If the distance between timestamps varies, this causes issues to the post processing.

We expect that the camera has a very reproducible behavioral. The Exposure time, readout of image sensor, transmitting data to host, camera’s frame-rate, etc should be constant. We expect the jitter (variations between timestamps) to be caused at data receiving point.
This is why the camera has to have a precise clock, which should be synced with host PC. Cameras have to add the time of shutter open to the image stream. So post-processing will be able to localize the image on the time-axis.

My question was how to synchronize GMSL cameras?
The Xaviers are synced via PTP on EHT0 from Logger-PC. How to transport this clock to cameras?