I am looking to hardware synchronize the lidar with a global shutter camera such that the lidar is phase-locked to point at 0° at the precise time that the camera’s global shutter exposure begins.
Right now it appears that the suggested way to do this is to configure the lidar to use the timestamp mode TIME_FROM_SYNC_PULSE_IN and provide into the GPIO port a sync pulse at 1 Hz.
From the documentation on TIME_FROM_SYNC_PULSE_IN:
A free running counter synced to the SYNC_PULSE_IN input counts seconds (# of pulses) and nanoseconds since sensor turn on. If
multipurpose_io_mode
is set toINPUT_NMEA_UART
then the seconds register jumps to time extracted from a NMEA $GPRMC message read on themultipurpose_io
port. Reported at ns resolution (both a second and nanosecond register in every UDP packet), but min increment is on the order of 10 ns.
However in my system there is no GPS attached and therefore no NMEA GRPMC message available, so it currently uses PTP synchronization to provide time to the lidar. Because of this, the behavior described above in the TIME_FROM_SYNC_PULSE_IN mode desciption is not suitable for the use case.
So the question is: is it possible to do phase locking using an external sync signal, while still using PTP time synchronization to keep the clock synchronized to some non-GPS PTP master?