ZED Link Mono GPIO Triggering

The ZED Link Mono GMSL2 capture card allows you to synchronize external sensors by using triggering signals on the 6-pin 2mm pitch GPIO connector J4.

Master mode - Trigger out #

The ZED Link Mono capture card is configured to operate in master mode by default.

In any case, if you change mode, you can set the card back to master mode by setting sync_mode=0 in the file /etc/systemd/system/zed_x_daemon.service and restarting the ZED X daemon service:

sudo sed -i 's/^sync_mode=./sync_mode=0/' /etc/systemd/system/zed_x_daemon.service # Set master mode
sudo systemctl daemon-reload # Reload systemd configuration
sudo systemctl restart zed_x_daemon.service # Restart ZED X daemon service

The default content of the file /etc/systemd/system/zed_x_daemon.service is as follows:

[Unit]
Description=ZED-X Daemon service
After=nvargus-daemon.service driver_zed_loader.service 
Requires=driver_zed_loader.service
StartLimitIntervalSec=0

[Service]
Type=simple
Restart=always
RestartSec=1
User=root
StandardOutput=syslog
ExecStart=/usr/sbin/ZEDX_Daemon

# 0 = no sync(Default), 1 = master/slave mode, 2 = slave mode only
sync_mode=0 

[Install]
WantedBy=multi-user.target

The output synchronization signal is available on pin #6 of the GPIO connector J4 as soon as the Jetson™ device boots and the ZED Link GMSL2 driver is installed.

  • Connect the ground signal (Yellow - GND) to pin #1.
  • Connect the trigger out signal (Green - MFP0) to pin #6.

Triggering signal #

The output trigger signal is a square wave, with its rising edge synchronized with the end of the exposure phase of the CMOS sensor.

The signal has a fixed Amplitude of 3.75V +/- 12%, while Width and Frequency change according to the frame rate setting of the camera.

Frame rate: 120 FPS - ZED X / ZED X Mini / ZED X One GS #

  • Amplitude: 3.75V +/- 12%
  • Width: 2.08 msec
  • Frequency: 120 Hz
  • Period: 8.33 msec

Frame rate: 60 FPS - ZED X / ZED X Mini / ZED X One GS / ZED X One 4K #

  • Amplitude: 3.75V +/- 12%
  • Width: 4.17 msec
  • Frequency: 60 Hz
  • Period: 16.67 msec

Frame rate: 30 FPS - ZED X / ZED X Mini / ZED X One GS / ZED X One 4K #

  • Amplitude: 3.75V +/- 12%
  • Width: 8.33 msec
  • Frequency: 30 Hz
  • Period: 33.33 msec

Frame rate: 15 FPS - ZED X / ZED X Mini / ZED X One GS / ZED X One 4K #

  • Amplitude: 3.75V +/- 12%
  • Width: 16.67 msec
  • Frequency: 15 Hz
  • Period: 66.67 msec

Slave mode - Trigger in #

The ZED Link Mono capture card requires specific commands to switch to slave mode.

  1. Set sync_mode=2 in the file /etc/systemd/system/zed_x_daemon.service to enable the external trigger input.

    sudo sed -i 's/^sync_mode=./sync_mode=2/' /etc/systemd/system/zed_x_daemon.service
    
  2. Reload the systemd configuration:

    sudo systemctl daemon-reload
    
  3. Connect PIN #1 (GND) to the ground signal of the trigger source.

  4. Connect PIN #5 (TRIG_IN - MFP1) to the trigger input signal, i.e., a 3.3V square wave signal.

  5. Restart the driver by restarting the ZED X daemon service:

    sudo systemctl restart zed_x_daemon.service
    

To verify that the Slave configuration is active, run the command:

sudo dmesg | grep Sync

The output should be similar to:

[   XX.XXXXXX] sl_max9296 2-0048: Sync mode configured

You must use an external trigger signal with the following characteristics:

  • Square wave
  • Amplitude: 3.3V +/- 10%
  • Frequency: Match the camera grab frame rate setting used with the ZED SDK - 15Hz, 30Hz, 60Hz, or 120Hz

When using multiple ZED Link Mono capture cards on the same NVIDIA® Jetson platform (i.e., 2x ZED Link Mono on an NVIDIA® Jetson Orin Nano), it’s possible to synchronize them together by using the trigger out signal of one card as the trigger in signal for the other card.

The first GMSL2 deserializer will automatically be configured as master, while the second one will operate in slave mode.

  1. Set sync_mode=1 in the file /etc/systemd/system/zed_x_daemon.service to enable the external trigger input.

    sudo sed -i 's/^sync_mode=./sync_mode=1/' /etc/systemd/system/zed_x_daemon.service
    
  2. Reload the systemd configuration:

    sudo systemctl daemon-reload
    
  3. Connect together the PIN #1 (GND) of both ZED Link Mono cards.

  4. Connect the PIN #6 (TRIG_OUT - MFP0) of the first card to the trigger input signal PIN #5 (TRIG_IN - MFP1) of the second card.

  5. Restart the driver restarting the ZED X daemon service:

    sudo systemctl restart zed_x_daemon.service