Skip to main content

Getting Started with GMSL2 Camera Splitter

Overview

The GMSL2 Camera Splitter, engineered by SZ SENSING TECH CO.,LTD., enables a single GMSL input to be distributed to two GMSL outputs while maintaining identical data streams. This device is compatible with SENSING GMSL camera models.

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

Specifications

ParameterValue
Transport ProtocolGMSL / GMSL2
Input Ports1
Output Ports2
Input Interface1× GMSL2
Output Interface2× 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_Splitter Dimensions

Hardware Overview

Block Diagram

GMSL2_Camera_Splitter Block Diagram

I2C Address Information

DeviceI2C Address (8-bit)
1Splitter: Logger0x80
2Splitter: ECU0x80
3Splitter: Camera0x94
4SENSING Camera0x70

Connector Pin Definition

GMSL2_Camera_Splitter Connector
Connector ComponentPart NumberManufacturer/Note
Splitter 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-BP0102-GMSL1CH2CHUp to 1920×1080@30fpsMAX967051.5Gbps
SG8-BP0102-GMSL21CH2CHUp to 3840×2160@30fpsMAX9295A6Gbps
SG8-BP0102-GMSL2F1CH2CHUp to 1920×1080@30fpsMAX96717F3Gbps

Getting Started

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

Using the Splitter when connecting to different domain controllers:

Splitter block diagram

Splitter block diagram - Configuration for connecting to different domain controllers

Operating Procedure

  1. Connect the system as shown in the diagram above.
  2. Power up the Splitter first.
  3. Initialize the Controller 1, which will power on and initialize the Splitter-ECU, followed by the Controller 2 power-on sequence and initialize the Splitter-Logger.
  4. Execute normal operation commands from both Domain Controllers 1 and 2 to bring up the camera.

Operational Logic

  1. Upon receiving power, the Splitter device automatically configures the connected camera.
  2. Domain Controller 1 only needs to configure the Splitter 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. Splitter Configuration:
/* Example code for Splitter 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
  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 GMSL2 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.