PPS in Drive orin to sync cameras externally

Please provide the following info (tick the boxes after creating this topic):
Software Version
DRIVE OS 6.0.8.1
DRIVE OS 6.0.6
DRIVE OS 6.0.5
DRIVE OS 6.0.4 (rev. 1)
DRIVE OS 6.0.4 SDK
other

Target Operating System
Linux
QNX
other

Hardware Platform
DRIVE AGX Orin Developer Kit (940-63710-0010-300)
DRIVE AGX Orin Developer Kit (940-63710-0010-200)
DRIVE AGX Orin Developer Kit (940-63710-0010-100)
DRIVE AGX Orin Developer Kit (940-63710-0010-D00)
DRIVE AGX Orin Developer Kit (940-63710-0010-C00)
DRIVE AGX Orin Developer Kit (not sure its number)
other

SDK Manager Version
1.9.3.10904
other

Host Machine Version
native Ubuntu Linux 20.04 Host installed with SDK Manager
native Ubuntu Linux 20.04 Host installed with DRIVE OS Docker Containers
native Ubuntu Linux 18.04 Host installed with DRIVE OS Docker Containers
other

Hi,

In my understanding, drive orin provides a PPS input option. This pps usually comes from a GNSS module.

Along with this I modified fsync group and I am able to trigger the gmsl camera at 10hz by changing dts file . Now I plan to enable nvpps in dts and do the ioctl call SETPARAMS in my application as per About PPS signal input.

My doubt is when I want to sync all cameras to this PPS, the camera is on 10 Hz. So should I modulate the PPS which is at 1Hz to 10 Hz using a some off the shelf circuitry like Arduino Uno and translate 1Hz PPS to 10hz and feed to PPS pin on Orin?

Will that trigger the fsync signal sent to the camera at “synced 10HZ” ?

or

Will the internal generator sync itself to the 1Hz PPS and manage sync of remaining 9 triggers until next PPS signal?

Kindly let me know if you need more info from my end or some clarifications.

Thanks!!
Jishnu

Could you please share the specific steps or configurations you implemented to achieve the 10 Hz camera triggering?

Instead of modulating the PPS externally, consider investigating why the PTP-to-TSC synchronization on the second boundary is not meeting your requirements. Understanding the challenges you face with the existing synchronization approach would help in providing more targeted assistance.

Could you elaborate on why the current PTP setup is not accurate enough for your use cases?

Hi @VickNV

Could you please share the specific steps or configurations you implemented to achieve the 10 Hz camera triggering?

I tried following these pages 6.0.8 nvsipl_camera fsync option - #7 by dbennington1 and Fsync Signal Generation | NVIDIA Docs

I have configured something like below:

tsc_sig_gen@c6a0000 {
    compatible = "nvidia,tegra234-cdi-tsc";
    ranges = <0x0 0x0 0xc6a0000 0x10000>;
    reg = <0x0 0xc6a0000 0x0 0x18>;
    #address-cells = <1>;
    #size-cells = <1>;
    status = "okay";

    gen0: generator@380 {
        reg = <0x380 0x80>;
        freq_hz = <10>;
        duty_cycle = <25>;
        offset_ms = <0>;
        status = "okay";
    };

    gen1: generator@400 {
        reg = <0x400 0x80>;
        freq_hz = <10>;
        duty_cycle = <25>;
        offset_ms = <0>;
        status = "okay";
    };

    gen2: generator@480 {
        reg = <0x480 0x80>;
        freq_hz = <10>;
        duty_cycle = <25>;
        offset_ms = <0>;
        status = "okay";
    };

    gen3: generator@500 {
        reg = <0x500 0x80>;
        freq_hz = <10>;
        duty_cycle = <25>;
        offset_ms = <0>;
        status = "okay";
    };
};

fsync-groups {
	status = "okay";
	fsync-group@0 {
		id = <0>;
		status = "okay";
		generators = <&gen0>, <&gen1>, <&gen2>, <&gen3>;
	};
};

Expectation is all the groups, A,B,C,D will trigger the cameras together and would be in sync. Moreover I am also trying to use camera_extra as a starting point with NvSciSyncFence hoping I would get more accurate sync between all groups. Kindly advice if my understanding is wrong.

Could you elaborate on why the current PTP setup is not accurate enough for your use cases?

Sorry I didn’t elaborate enough earlier. In my setup I have lidars + GNSS + Cameras. So I wish to trigger the lidar and the camera at the same time to get best lidar-camera sync. I am already using ptp4l and doing PTP sync amongst the three. Now both Lidar and camera are at 10Hz believing the above configuration would work as expected. So I am expecting the PPS would bring more accurate and precise sync of each lidar scan with camera capture.

Hence the question of modulating the 1Hz PPS to 10Hz input at pin 68. I am planning to enable the nvpps module in dts and call the ioctl to set params as mentioned above.

Without PPS at the moment we see some drift in time between the camera frame and the corresponding lidar scan when using nvsipl application. So the two questions, 1. will this approach increase my accuracy or do you have some more suggestions about the configuration, 2. Should I modify PPS to 10Hz using external circuitry?

Please do let me know if I should provide more info.

Thanks!!
Jishnu

Please proceed with enabling PPS, make sure the lidar is in a locked state, and share your observations after doing so.

Also, Driveworks, Orin : Camera Lidar Time Alignment via PTP is a relevant topic.

Hi @VickNV

Could you please confirm if " Should I modify PPS to 10Hz using external circuitry?" should be done and will that enable me to have exact 10Hz trigger to both lidar and camera ?

Yes I always ensure lidar is locked. I will definitely share the observations in the following days.

Thanks!!

I recommend starting with the 1 Hz PPS setup and observing the system for any inaccuracies.

1 Like

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