PPS in Drive orin to sync cameras externally

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