Synchronizing multiple DrivePX2 boards

Dear Gentleman,

I would like to ask if any of you have any experience with synchronizing multiple DrivePX2 boards. NVIDIA provided a solution to synchronize a the two Tegra cores and the Aurix controller via PTP.

I experienced with running the PX2 boards in the following layout:
DrivePx2 board #1

  • TegraA - PTP timemaster
  • TegraB - PTP slave
  • DrivePx2 board #2
  • TegraA - PTP slave
  • TegraB - PTP slave

This way I was able to sync the Tegra processors, but not the aurix as expected. But the recorder tool (recorder-qtgui) is using the timestamps from the CLOCK_MONOTONIC timestamp. This is not effected by PTPd, only by adjusting the clock frequency. Unfortunately with this setup it is not possible to maintain sync between the boards. As the PTPd acts on the CLOCK_REALTIME and maintains sync between those clocks.

I later tried overloading the system call getting the value CLOCK_MONOTINIC via LD_PRELOAD and a custom shared object (so, dynamic link library). But I noticed that the DriveworksAPI is using other shared libraries, thus overloading the system call for the main library was not effective.

TLDR:
How is it possible to sync more that one DrivePx2 board? Is there a reccomended way from NVIDIA?

Hi,

The recorder tool is supposed to use the system clock.

Have you read the documentation under Aurix/Tegra A/Tegra B Synchronization and Time Synchronization (P2379)?

Fabian

Yes I did. I noticed an issue with the recordtool using multiple PX2 Autochauffeur boards. When the record tool is started on the boards, the tool seems to calculate a “monotonic epoch offset” then it uses this offset, and ignores if the system clock jumps (e.g. due to a PTP time master reset). This behaviour gave me the impression that the tool is using the CLOCK_MONOTONIC timer.

By reading the aforementioned docs now I see that it is using the system clock. I guess the tool calculates the offset from the Epoch, then is ignores the clock jumps, which is the desired behaviour for a record tool.