Inquiry about dwImageTimestamps.eofTimestampUs()

DRIVE OS Version: 6.0.10

Inquiry about dwImageTimestamps.eofTimestampUs

I have a question regarding the behavior of dwImageTimestamps.eofTimestampUs.

Using DriveWorks 5.20’s samples/src/sensors/camera/camera as a base, I implemented a test application that obtains the following two timestamps immediately after calling dwSensorCamera_readFrame():

  • Value1: CLOCK_REALTIME measured immediately after dwSensorCamera_readFrame().

  • Value2: dwImageTimestamps.eofTimestampUs corresponding to the same frame.

For these tests I continuously synchronize the system clock and the PHC using:


sudo phc2sys -s CLOCK_REALTIME -c /dev/ptp2 -m -O 0

Test conditions

I tested the behavior while varying the following two conditions:

  1. Whether the application was run with sudo privileges.

  2. Whether the device node /dev/nvpps0 was accessible (e.g., chmod 600 or chmod 777).

Test results

+--------+------+------------------+------------------+------------------+------------------+
| Test   | sudo | /dev/nvpps0      | Value1           | Value2           | Note             |
+--------+------+------------------+------------------+------------------+------------------+
| Test 1 | no   | not accessible   | 1735721700.468   | 1735721700.468   | match            |
| Test 2 | yes  | not accessible   | 1735721671.401   | 1735721675.233   | differ ≈ 3.8s    |
| Test 3 | no   | accessible       | 1735721865.268   | 1735721869.100   | differ ≈ 3.8s    |
| Test 4 | yes  | accessible       | 1735721919.268   | 1735721923.100   | differ ≈ 3.8s    |
+--------+------+------------------+------------------+------------------+------------------+

Questions

  1. In Test 1, Value1 and Value2 match exactly, but in Tests 2–4 there is a discrepancy of more than three seconds, even though phc2sys is continuously synchronizing the system clock and the PHC. Could you explain why this discrepancy occurs?

  2. From these results, does dwImageTimestamps.eofTimestampUs depend on whether the application is run with sudo privileges and/or whether /dev/nvpps0 is accessible? In other words, does the time source or the timestamp calculation path used for eofTimestampUs change depending on these permission conditions?