Skip to main content

Getting Started with GMSL2 Camera Repeater

Overview

The GMSL2 Repeater is designed by SZ SENSING TECH CO.,LTD., which can realize one GMSL2 input and one GMSL2 output, so as to extend the transmission distance.

Key Features
  • Lossless data transmission
  • Full GMSL/GMSL2 compatibility
  • Ultra-low latency (microsecond level)
  • Minimal insertion loss
GMSL2_Camera_Repeater

Specifications

ParameterValue
Transport ProtocolGMSL / GMSL2
Input Ports1
Output Ports1
Input Interface1× GMSL2
Output Interface1× GMSL2
Supported Data Rates1.5Gbps, 3Gbps, 6Gbps
Maximum ResolutionUp to 3840×2160
Output Synchronization Accuracy< 10μs
Power SupplyYes
ConnectorFakra Z Type
Operating Temperature Range-40°C to +85°C
Dimensions87.5mm × 70.6mm × 20mm
ColorBlack
Weight< 150g

Dimensions

GMSL2_Camera_Repeater Dimensions

Hardware Overview

Block Diagram

GMSL2_Camera_Repeater Block Diagram

I2C Address Information

DeviceI2C Address (8-bit)
1Repeater: ECU0x80
2Repeater: Camera0x94
3SENSING Camera0x70

Connector Pin Definition

GMSL2_Camera_Repeater Connector
Connector ComponentPart NumberManufacturer/Note
Repeater Device Connector50352-0400Molex
Cable Harness Connector50351-0400Molex
Power SupplyPin3, Pin49~12V DC
GroundPin1, Pin2Common Ground

Cable Harness Definition

GMSL2_Camera_Splitter Cable Harness

Product Models

Product ModelInput ChannelsOutput ChannelsResolution SupportProcessorData Transfer Rate
SG2-BP0101-GMSL1CH1CHUp to 1920×1080@30fpsMAX967051.5Gbps
SG8-BP0101-GMSL21CH1CHUp to 3840×2160@30fpsMAX9295A6Gbps

Getting Started

1. GMSL2 Camera Repeater Integration with Customer's Self-developed Platform

Using the Repeater when connecting to different domain controllers:

Repeater block diagram

Repeater block diagram - Configuration for connecting to domain controllers

Operating Procedure

  1. Connect the system as shown in the diagram above.
  2. Power up the Repeater first.
  3. Initialize the Controller, which will power on and initialize the Repeater-ECU.
  4. Execute normal operation commands from the Controller to bring up the camera.

Operational Logic

  1. Upon receiving power, the Repeater device automatically configures the connected camera.
  2. Domain Controller only needs to configure the Repeater as if it were a camera, then trigger it normally to activate the imaging pipeline.
tip

Refer to the software flow and example code below to develop your custom driver implementation.

2. Controller Software Development Example Code

  1. Driver Development:
/* Example code for MAX9296 I2C initialization */
#define MAX9296_I2C_ADDR 0x90 // 8-bit address

int max9296_init() {
// Initialize I2C bus
i2c_init();

// Disable MIPI output during configuration
i2c_write(MAX9296_I2C_ADDR, 0x0313, 0x00);
delay_ms(100);
// Configure link settings for GMSL2 (6Gbps)
i2c_write(MAX9296_I2C_ADDR, 0x0001, 0x02);

// Configure linkA and linkB settings for GMSL2 selection (default value)
i2c_write(MAX9296_I2C_ADDR, 0x0006, 0xC0);

// Configure MIPI rate to 1200Mbps
i2c_write(MAX9296_I2C_ADDR, 0x0320, 0x2C);

// Enable MIPI output
i2c_write(MAX9296_I2C_ADDR, 0x0313, 0x02);

return 0;
}
  1. Repeater Configuration:
/* Example code for Repeater initialization */

#define MAX9295A_I2C_ADDR 0x80 // 8-bit address

int Splitter_init() {
// Initialize deserializer first
max9296_init();

// Reset ISP
i2c_write(MAX9295A_I2C_ADDR, 0x02BE, 0x10); // MFP0 high

// Configure essential registers
i2c_write(MAX9295A_I2C_ADDR, 0x0057, 0x12);
i2c_write(MAX9295A_I2C_ADDR, 0x005B, 0x11);

// Configure datatype to YUV422 8bit
i2c_write(MAX9295A_I2C_ADDR, 0x0318, 0x5E);

// Camera trigger sequence: MFP7 low to high
i2c_write(MAX9295A_I2C_ADDR, 0x02D3, 0x00); // MFP7 low
delay_ms(300);
i2c_write(MAX9295A_I2C_ADDR, 0x02D3, 0x10); // MFP7 high

// Initialize sensor,if without ISP, skip this step
sensor_init();

return 0;
}

int sensor_init() {
// Initialize sensor
i2c_write(sensor_I2C_ADDR, 0x0102, 0x0001);
// Additional sensor initialization parameters
// (Refer to Camera Information documentation for the complete sensor register configuration)
}

Integration Steps

  1. BSP Integration:

    • Modify the device tree to include the GMSL2 interface configuration
    • Add the camera driver to kernel build configuration
    • Configure the media controller pipeline for the camera
    • Configure the Repeater-ECU
  2. Application Development:

/* Example code for capturing camera frames */
#include "camera_api.h"

int main() {
// Open camera device
int fd = open("/dev/video0", O_RDWR);
if (fd < 0) {
perror("Failed to open camera device");
return -1;
}

// Configure video capture format
struct v4l2_format fmt = {0};
fmt.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
fmt.fmt.pix.width = 1920;
fmt.fmt.pix.height = 1536;
fmt.fmt.pix.pixelformat = V4L2_PIX_FMT_YUYV;

if (ioctl(fd, VIDIOC_S_FMT, &fmt) < 0) {
perror("Failed to set format");
close(fd);
return -1;
}

// Request and map buffers
// ... (buffer setup code) ...

// Start streaming
// ... (streaming code) ...

// Capture and process frames
// ... (frame processing code) ...

// Cleanup
close(fd);
return 0;
}

Step 2: Data Processing

After receiving the module data through the MIPI CSI interface:

  • Data Reception
    • GMSL2 protocol implementation
    • Data rate configuration
  • Image Processing Pipeline
    • YUV422 8bit data parsing
    • Image format conversion

Technical Support

  • Documentation

    • Comprehensive register descriptions
    • Integration guides
  • Engineering Support

    • Technical consultation
    • Debugging assistance
    • Performance optimization
tip

SENSING Technology provides expert technical support for integration with most platforms. For detailed documentation, sample code, and technical assistance, please contact our support team.