GMSL Camera Development Guide#
This documentation provides a comprehensive guide to Gigabit Multimedia Serial Link (GMSL) camera development using the NVIDIA SIPL framework and Unified Device Driver Framework (UDDF) on supported NVIDIA Jetson platforms, including the Jetson AGX Thor and Jetson Orin families.
It covers the GMSL hardware topology, the UDDF DDI interfaces that drivers must implement, the Sensor System Config JSON schema used to describe GMSL hardware, and a step-by-step guide to writing and integrating a GMSL driver.
Every GMSL camera link requires these six drivers. CameraHAL discovers each one by its DDI interface UUID at startup. If any is missing, the link will not initialize.
The following examples sketch the six driver pieces (module, sensor, serializer, deserializer, deserializer power, module power) as in a typical first UDDF-based GMSL link.
Module Driver#
// caSerDes/modules/MyModule/MyModule.cpp
bool MyModule::doCreateUbbObjects(
GmslModuleContext::Config const& cfg) {
return
addSensorUbb(make_unique<MySensor>(cfg)) &&
addEepromUbb(make_unique<MyEeprom>(cfg)) &&
addSerializerUbb(make_unique<MySerializer>(cfg));
}
bool MyModule::doPreProbeHardware(
GmslModuleContext const& ctx, bool) {
if (m_serializerUbb) {
GmslSerializerContext s{ctx.hwAccess,
ctx.driverServices};
m_serializerUbb->SetGPIOLevel(s, 1, 0); // reset
m_serializerUbb->SetGPIOLevel(s, 1, 1);
}
return true;
}
Sensor Driver#
// drivers/sensors/MySensor/MySensor.cpp
DeviceTable MySensor::GetDeviceTable() const {
return {{ .i2cAddress=0x1A, .offsetWidth=2,
.dataWidth=1 }};
}
bool MySensor::ProbeHardware(
GmslModuleContext const& ctx, bool alreadyInit) {
if (!alreadyInit)
ctx.hwAccess->SubmitSequence(hsl::check_id);
return true;
}
bool MySensor::Init(GmslModuleContext const& ctx) {
ctx.hwAccess->SubmitSequence(hsl::init_seq);
return ctx.hwAccess->GetErrorState();
}
bool MySensor::StartStreaming(/*ctx*/) { ... }
bool MySensor::SetSensorControls(/*...*/) { ... }
bool MySensor::GetSensorAttributes(/*...*/) { ... }
bool MySensor::ParseTopEmbeddedData(/*...*/) { ... }
Serializer Driver#
// drivers/serializers/MySerializer/MySerializer.cpp
DeviceTable MySerializer::GetDeviceTable() const {
return {{ .i2cAddress=0x40, .offsetWidth=2,
.dataWidth=1 }};
}
void MySerializer::SerGetInfo(
GmslSerializerInfo& info) {
info.model = "MySerializer";
}
bool MySerializer::SerInit(
GmslSerializerContext const& ctx) {
ctx.hwAccess->SubmitSequence(hsl::ser_init);
return ctx.hwAccess->GetErrorState();
}
bool MySerializer::SerPrepareForModuleInit(/**/)
{ ... }
bool MySerializer::SerFinalizeInit(/**/)
{ ... }
bool MySerializer::SerConfigureGPIOForwarding(/**/)
{ ... }
Deserializer Driver#
// drivers/deserializers/MyDeser/MyDeser.cpp
// IGmslDeserializer - typically NVIDIA-provided
bool MyDeser::ConfigureDriver(
DeserializerContext& ctx,
DeviceTable& devs, GpioPinTable& g) {
devs.push_back({.i2cAddress=0x29,
.offsetWidth=2, .dataWidth=1});
return true;
}
bool MyDeser::ProbeHardware(
DeserializerContext& ctx, bool) { ... }
bool MyDeser::Init(DeserializerContext&) { ... }
bool MyDeser::InitWithSerializer(/*ctx, link*/) { ... }
bool MyDeser::FinalizeInitWithSerializer(/**/) { ... }
bool MyDeser::ControlLink(/*ctx, link, en*/) { ... }
bool MyDeser::CheckLinkLock(/*ctx, mask*/) { ... }
bool MyDeser::StartStreaming(/*ctx, mask*/) { ... }
bool MyDeser::StopStreaming(/*ctx, mask*/) { ... }
Deserializer Power#
// drivers/power/MyDeserPower/MyDeserPower.cpp
// Raw DDI - no UBB
bool MyDeserPower::ConfigureDriver(
GmslDeserializerPowerControlContext const& ctx,
DeviceTable& devs, GpioPinTable& gpios) {
gpios.push_back({.pin=0, .direction=OUT});
return true;
}
bool MyDeserPower::EnablePower(
GmslDeserializerPowerControlContext const& ctx) {
auto& seq = ctx.hwAccess->GetDynamicSequence();
seq.gpioBuilder()->set(0, 1); // pin 0 high
ctx.hwAccess->SubmitSequence(seq);
return ctx.hwAccess->GetErrorState();
}
bool MyDeserPower::DisablePower(/*ctx*/) { ... }
Module Power (PMIC)#
// drivers/power/MyModulePower/MyModulePower.cpp
// Raw DDI - no UBB
bool MyModulePower::ConfigureDriver(
GmslModulePowerControlContext const& ctx,
DeviceTable& devs, GpioPinTable& g) {
devs.push_back({.i2cAddress=0x28,
.offsetWidth=1, .dataWidth=1});
return true;
}
bool MyModulePower::EnableModulePower(
GmslModulePowerControlContext const& ctx, size_t idx) {
ctx.hwAccess->SubmitSequence(
hsl::pmic_enable[idx]);
return ctx.hwAccess->GetErrorState();
}
bool MyModulePower::DisableModulePower(/**/) { ... }
bool MyModulePower::EnableModulePowerMask(/**/)
{ ... }
Getting Started#
For developers new to GMSL camera development on NVIDIA platforms, follow this sequence:
SIPL Framework Introduction
Learn about the core imaging pipeline framework shared by all NVIDIA camera solutions.
- Introduction to SIPL
Introduction to the Safe Image Processing Library (SIPL), covering fundamental concepts, architecture, and basic usage patterns.
HSL and UDDF Overview
Understand the hardware abstraction layer and driver framework that underpins all GMSL drivers.
- HSL and UDDF Overview
Overview of Hardware Sequence Language (HSL) and UDDF, including the DDI/CDI interface model, the hardware access pattern, and driver discovery.
GMSL Architecture Overview
Understand the GMSL hardware topology, the five UDDF driver types, and the serdes initialization sequence.
- GMSL Architecture Overview
GMSL topology, driver type summary, and the complete ordered initialization sequence that the SIPL camera HAL follows.
Development Guides#
Configuration and Tools#
- JSON File Categories
Comprehensive guide to writing SIPL Query JSON files for GMSL camera systems:
Platform transport settings schema (
platformTransportSettings).Sensor system config schema.
Component database files for sensors, serializers, deserializers, and modules.
Annotated examples drawn from real configs.
Sensor Driver Development#
- Guide to Writing GMSL UDDF Drivers
Step-by-step guide to writing UDDF drivers for GMSL camera systems:
Deserializer driver (
IGmslDeserializer).Camera module driver (
IGmslModuleControl).Serializer sub-component (
IGmslSerializer).Power drivers (
IGmslDeserializerPowerControl,IGmslModulePowerControl).UDDF Building Blocks (UBB) convenience layer.
I2C address modes and virtual address translation.
- Integrating GMSL UDDF Drivers with SIPL
Guide for integrating GMSL UDDF drivers with the SIPL framework:
Driver name matching between
DriverInfo.nameand JSON config fields.Installation path and automatic discovery by SIPL.
Driver library entry point requirements.
Common Development Tools#
- Guide to Writing UDDF Drivers
General UDDF driver development guide covering C++ language requirements, HSL submission, the PyHSL toolchain, and the build system integration. Applicable to both CoE and GMSL drivers.
- PyHSL
Guide for using PyHSL tools to author and compile hardware sequences:
Python API reference for I2C and GPIO sequences.
Bypassing virtual address translation with
no_virtual_address.Using
I2CAddressModefor physical-address raw reads.
Reference Documentation#
Supported Image Formats#
- SIPL Image Formats
Complete reference for supported image formats in NvMedia and NvSIPL, including the RAW formats (RAW8, RAW10, RAW12, RAW12RJ, RAW16) used by GMSL sensors.
SIPL Notifications#
- Camera SIPL Notifications
Reference documentation for SIPL error and event notifications, including link-fault and deserializer error notifications relevant to GMSL applications.
- GMSL Architecture Overview
- Directory Layout and Build
- Guide to Writing GMSL UDDF Drivers
- Overview of Driver Types
- Deserializer Driver (IGmslDeserializer)
- Camera Module Driver (IGmslModuleControl)
- Serializer Sub-Component (IGmslSerializer)
- Deserializer Power Driver (IGmslDeserializerPowerControl)
- Module Power Driver (IGmslModulePowerControl)
- UDDF Building Blocks (UBB)
- Driver Library Entry Point
- Checklist for GMSL Driver Development
- Integrating GMSL UDDF Drivers with SIPL
Glossary#
- GMSL#
Gigabit Multimedia Serial Link. A high-speed serial link standard (GMSL1, GMSL2 at 3 or 6 Gbps, GMSL3) developed by Maxim Integrated / Analog Devices for automotive and industrial camera connectivity.
- Deserializer#
A chip on the SoC side that receives serialized video data over a GMSL link and converts it to parallel CSI-2 data for the SoC camera interface.
- Serializer#
A chip on the camera module side that converts parallel sensor data to a serialized GMSL bitstream for transmission to the deserializer.
- Serdes#
Serializer/Deserializer. The combination of a serializer and a deserializer forming a GMSL link.
- UBB#
UDDF Building Blocks. An optional convenience layer for GMSL module drivers that automates interface routing, component lifecycle management, and device table aggregation.
- FSYNC#
Frame Synchronization signal. Used to synchronize frame capture across multiple cameras. Configurable as
OSC_MANUAL(internal oscillator) orEXTERNAL(driven by the SoC).- TPG#
Test Pattern Generator. A feature of some serializer chips that generates a synthetic image pattern without a physical sensor, useful for system validation.