====== Dual MAX9296-GMSL2 Camera Interface Expansion Board ====== ===== Main Features ===== * Compatible with TI-TDA series boards (tested with the following boards: tda4vm evaluation kit (EVM), tda4vm-starter-kit (SK)). * Supports up to 4 camera channels (MAX9296, 2 channels * 2). * Uses GPIO for power control, allowing individual power supply control for each camera channel. * Provides reserved multi-camera synchronization trigger interface, capable of synchronizing up to 4 cameras. * Offers reference drivers for some cameras. ===== Shipping List ===== * Expansion board, quantity 1 * Screws, several (SK version: diameter 2.5mm, length 5mm; EVM version: diameter 2.5mm, length 11mm) ===== Main Features ===== * Works with TI-TDA series boards(Test on:tda4vm evaluation kit(EVM), tda4vm-starter-kit(SK)); * Connect max. 4 GMSL cameras(MAX9296, 2-channel*2) * Use GPIOs of serializer to control POC. * Reserved Fsync input port, can sync 4-camera input * Provide GMSL RTOS driver. ===== Shipping list ===== * Expansion board * Mounting screws, (SK-board:M2.5,L=5mm; EVM:M2.5mm,L=11cm) ===== Board Diagram ===== {{ :扩展卡:dual_max9296_struct.png?400 |expansion board}} (may change without prior notice) ==== Key Parameters ==== * GMSL channel number: 4 (max) * Power Supply: 5-20V, USB-c, 45W USB-PD compliant * GMSL POC voltage 8.8 - 9V, 800mA for each link * Support internel/external sync * GMSL Link status indication ===== Installation and Connection ===== **Attention: please use components we provided to install and fasten the expansion board, or may affect system stability.** ==== SK board installation ==== As shown in image below, expansion board and mainboard are connected use three M2.5/L=5mm spacer. {{ :扩展卡:dual9296_sk_stack_v5.png?direct&600 |}} {{ :扩展卡:dual9296_sk_stack_v5_1.png?direct&600 |}} ==== EVM Installation ==== Expansion board and EVM board are connect with 3 M2.5/L=11mm spacer。 {{ :扩展卡:dual9296_evm_stack_v4-3.png?direct&600 |}} {{ :扩展卡:dual9296_evm_stack_v4-4.png?direct&600 |}} ==== Connect Power Supply ==== Please use offical recommend power supply and ensure sufficient capacity. ==== Connect GMSL Camera ==== * Confirm that the POC voltage matches camera norminal working voltage. * If POC control is not necessary, please install 'force-power-on' jumpper. > No GMSL camera? check out our [[en:摄像头及视频源:gmsl2摄像头|GMSL cameras]] or video inject devices: [[en:摄像头及视频源:hdmi转gmsl|yCamSim-basic]], [[en:摄像头及视频源:hdmi转gmsl_支持raw输出|yCamSim-pro]], [[en:摄像头及视频源:video_injection_trueraw|yCamSim-ultra]] ===== Quick Start ===== #: Step 1: Connect hardware Please connect main board and expansion board according to description above. Please ensure reliable connection or cause improper operation or even damage to the hardware. {{ :扩展卡:微信图片_20230226222957.jpg?direct&600 |}} :# #: Step 2: Connect Camera(s) With provides firmware, we add support of two GMSL cameras: * GW5200-IMX390-GMSL2 from sensing world. * HDMI to GMSL2 video convertor:[[en:摄像头及视频源:hdmi转gmsl|yCamSim-basic]] {{ :扩展卡:微信图片_20230226222909.jpg?direct&600 |}} For other cameras, please checkout our guide of porting drivers. **Please pay attention to camera supply voltage** :# #: Step 3: Main board setup Insert TF card we provide. currently, we provide Images of SK board only. Compare with officail Image, we made following changes: * Display controlled by R5, instead of Linux; * Camera driver/config by RTOS, instead of linux. * NNET use openvx framework. Connect display, ethernet cable, UART cable. Please use HDMI display. :# #: Step 4: Power on Connect power supply to Type-C port of main board, ensure that the LED status is normal, and confirm: * Type-C USB has sufficient capability. * Camera POC jumpper is installed. (if it is control by GPIO, jumps are not necessary) :# #: Step 5: Run test application Use SSH/UART to login to a terminal, run below script to setup environment: cd /opt/vision_apps source ./vision_apps_init.sh ./run_app_single_cam.sh **注意,注意,如果摄像头连接的是CH1,需要运行针对CSIRX2_1编译的程序。** ./run_app_single_cam_ch1.sh 正常运行时的log [采购后可查看] root@j7-evm:/opt/vision_apps# ./run_app_single_cam.sh APP: Init ... !!! MEM: Init ... !!! MEM: Initialized DMA HEAP (fd=4) !!! MEM: Init ... Done !!! IPC: Init ... !!! IPC: Init ... Done !!! REMOTE_SERVICE: Init ... !!! REMOTE_SERVICE: Init ... Done !!! 535.601103 s: GTC Frequency = 200 MHz APP: Init ... Done !!! 535.601221 s: VX_ZONE_INIT:Enabled 535.601231 s: VX_ZONE_ERROR:Enabled 535.601243 s: VX_ZONE_WARNING:Enabled 535.601917 s: VX_ZONE_INIT:[tivxInitLocal:130] Initialization Done !!! 535.602127 s: VX_ZONE_INIT:[tivxHostInitLocal:86] Initialization Done for HOST !!! sensor_selection = [0] ldc_enable = [0] num_frames_to_run = [1000000000] is_interactive = [1] IttCtrl_registerHandler: command echo registered at location 0 IttCtrl_registerHandler: command iss_read_2a_params registered at location 1 IttCtrl_registerHandler: command iss_write_2a_params registered at location 2 IttCtrl_registerHandler: command iss_raw_save registered at location 3 IttCtrl_registerHandler: command iss_yuv_save registered at location 4 IttCtrl_registerHandler: command iss_read_sensor_reg registered at location 5 IttCtrl_registerHandler: command iss_write_sensor_reg registered at location 6 IttCtrl_registerHandler: command dev_ctrl registered at location 7 IttCtrl_registerHandler: command iss_send_dcc_file registered at location 8 NETWORK: Opened at IP Addr = 192.168.123.158, socket port=5000!!! 535.606638 s: ISS: Enumerating sensors ... !!! 535.607496 s: ISS: Enumerating sensors ... found 0 : ON_AR0231_9296_96705_1K_CH0 535.607506 s: ISS: Enumerating sensors ... found 1 : S_IMX390_9296_9295_2K_CH1 535.607514 s: ISS: Enumerating sensors ... found 2 : S_OX01_9296_96705_1K_S_CH1 535.607521 s: ISS: Enumerating sensors ... found 3 : S_OX08_9296_9295_4K_CH0 535.607527 s: ISS: Enumerating sensors ... found 4 : XREAL_0231_9296_9295_2K_CH0 535.607533 s: ISS: Enumerating sensors ... found 5 : XREAL_LT6911_HDMI_4K 535.607539 s: ISS: Enumerating sensors ... found 6 : XREAL_LT6911_HDMI_3K 535.607546 s: ISS: Enumerating sensors ... found 7 : XREAL_LT6911_9296_9295_4K_CH0 535.607552 s: ISS: Enumerating sensors ... found 8 : XREAL_LT6911_9296_9295_2K_CH0 Select camera port index 0-7 : [MCU2_0] 535.606849 s: ImageSensor_RemoteServiceHandler: IM_SENSOR_CMD_CREATE [MCU2_0] 535.606969 s: set I2C mux to config serdes and camera. 0 9 registered sensor drivers a : ON_AR0231_9296_96705_1K_CH0 b : S_IMX390_9296_9295_2K_CH1 c : S_OX01_9296_96705_1K_S_CH1 d : S_OX08_9296_9295_4K_CH0 e : XREAL_0231_9296_9295_2K_CH0 f : XREAL_LT6911_HDMI_4K g : XREAL_LT6911_HDMI_3K h : XREAL_LT6911_9296_9295_4K_CH0 i : XREAL_LT6911_9296_9295_2K_CH0 Select a sensor above or press '0' to autodetect the sensor : Invalid selection . Try again 9 registered sensor drivers a : ON_AR0231_9296_96705_1K_CH0 b : S_IMX390_9296_9295_2K_CH1 c : S_OX01_9296_96705_1K_S_CH1 d : S_OX08_9296_9295_4K_CH0 e : XREAL_0231_9296_9295_2K_CH0 f : XREAL_LT6911_HDMI_4K g : XREAL_LT6911_HDMI_3K h : XREAL_LT6911_9296_9295_4K_CH0 i : XREAL_LT6911_9296_9295_2K_CH0 Select a sensor above or press '0' to autodetect the sensor : c Sensor selected : S_OX01_9296_96705_1K_S_CH1 LDC Selection Yes(1)/No(0) : LDC Selection Yes(1)/No(0) : 0 Querying S_OX01_9296_96705_1K_S_CH1 540.507882 s: ISS: Querying sensor [S_OX01_9296_96705_1K_S_CH1] ... !!! 540.508334 s: ISS: Querying sensor [S_OX01_9296_96705_1K_S_CH1] ... Done !!! YUV Input selected. VISS and AEWB nodes will be bypassed. 540.508352 s: ISS: Initializing sensor [S_OX01_9296_96705_1K_S_CH1], doing IM_SENSOR_CMD_PWRON ... !!! 540.508796 s: ISS: Initializing sensor [S_OX01_9296_96705_1K_S_CH1], doing IM_SENSOR_CMD_CONFIG ... !!! [MCU2_0] 540.508085 s: ImageSensor_RemoteServiceHandler: IM_SENSOR_CMD_QUERY [MCU2_0] 540.508146 s: Received Query for S_OX01_9296_96705_1K_S_CH1 [MCU2_0] 540.508540 s: ImageSensor_RemoteServiceHandler: IM_SENSOR_CMD_PWRON [MCU2_0] 540.508592 s: IM_SENSOR_CMD_PWRON : channel_mask = 0x1 [MCU2_0] 540.508637 s: OV10640s_PowerOn : chMask = 0x0 [MCU2_0] 540.508969 s: ImageSensor_RemoteServiceHandler: IM_SENSOR_CMD_CONFIG [MCU2_0] 540.509020 s: Application requested features = 0x0 [MCU2_0] [MCU2_0] 540.509061 s: Configuring camera # 0 [MCU2_0] 540.509096 s: [MCU2_0] reset max9296 [MCU2_0] 540.608392 s: [MCU2_0] power off all cameras. [MCU2_0] 540.608438 s: [MCU2_0] Turn on surround view cameras, channel 0. [MCU2_0] 541.108387 s: [MCU2_0] turn off output serializer. [MCU2_0] 541.108432 s: Config de-serial. [MCU2_0] 541.108465 s: i2c write: Ins:3, dev:0x48, reg:0x313, val:0x0 [MCU2_0] 541.113392 s: [MCU2_0] 541.113424 s: config serializer. [MCU2_0] 541.113455 s: i2c write: Ins:3, dev:0x40, reg:0x4d, val:0xc0 [MCU2_0] 541.163879 s: Reg: 0x4d: val: 0xc0 [MCU2_0] 541.164876 s: Reg: 0x 0: val: 0x80 [MCU2_0] 541.165877 s: Reg: 0x 1: val: 0x90 [MCU2_0] 541.166391 s: i2c write: Ins:3, dev:0x40, reg:0x4, val:0x43 [MCU2_0] 541.216389 s: i2c write: Ins:3, dev:0x40, reg:0x6, val:0xab [MCU2_0] 541.266390 s: i2c write: Ins:3, dev:0x40, reg:0x34, val:0xae [MCU2_0] 541.316389 s: i2c write: Ins:3, dev:0x40, reg:0xc, val:0x80 [MCU2_0] 541.366390 s: i2c write: Ins:3, dev:0x40, reg:0x1, val:0x94 [MCU2_0] 541.416389 s: i2c write: Ins:3, dev:0x40, reg:0xb, val:0x8a [MCU2_0] 541.466390 s: i2c write: Ins:3, dev:0x40, reg:0x7, val:0x84 [MCU2_0] 541.516390 s: i2c write: Ins:3, dev:0x40, reg:0xf, val:0xbf [MCU2_0] 541.566388 s: i2c write: Ins:3, dev:0x40, reg:0x67, val:0xc4 [MCU2_0] 541.616389 s: i2c write: Ins:3, dev:0x40, reg:0x43, val:0x25 [MCU2_0] 541.666390 s: i2c write: Ins:3, dev:0x40, reg:0x48, val:0x2d [MCU2_0] 541.716388 s: i2c write: Ins:3, dev:0x40, reg:0x49, val:0x98 [MCU2_0] 541.766389 s: i2c write: Ins:3, dev:0x40, reg:0x4, val:0x83 [MCU2_0] 542.049338 s: set I2C mux to config serdes and camera. [MCU2_0] 542.050296 s: Reg: 0x 4: val: 0x83 [MCU2_0] 542.050927 s: Reg: 0x48: val: 0x2d [MCU2_0] 542.051920 s: Reg: 0x49: val: 0x98 [MCU2_0] 542.252391 s: Config de-serial. [MCU2_0] 542.252433 s: i2c write: Ins:3, dev:0x48, reg:0xb06, val:0x87 [MCU2_0] 542.257388 s: i2c write: Ins:3, dev:0x48, reg:0xc06, val:0x87 [MCU2_0] 542.295387 s: i2c write: Ins:3, dev:0x48, reg:0xb07, val:0x84 [MCU2_0] 542.300388 s: i2c write: Ins:3, dev:0x48, reg:0xc07, val:0x84 [MCU2_0] 542.305386 s: i2c write: Ins:3, dev:0x48, reg:0x11, val:0xf [MCU2_0] 542.310387 s: i2c write: Ins:3, dev:0x48, reg:0x6, val:0x1f [MCU2_0] 542.315388 s: i2c write: Ins:3, dev:0x48, reg:0xb0d, val:0x80 [MCU2_0] 542.320388 s: i2c write: Ins:3, dev:0x48, reg:0xc0d, val:0x80 [MCU2_0] 542.325386 s: i2c write: Ins:3, dev:0x48, reg:0x322, val:0x30 [MCU2_0] 542.330388 s: i2c write: Ins:3, dev:0x48, reg:0xf00, val:0x1 [MCU2_0] 542.335389 s: i2c write: Ins:3, dev:0x48, reg:0x40b, val:0x7 [MCU2_0] 542.340386 s: i2c write: Ins:3, dev:0x48, reg:0x42d, val:0x15 [MCU2_0] 542.345387 s: i2c write: Ins:3, dev:0x48, reg:0x40d, val:0x1e [MCU2_0] 542.350387 s: i2c write: Ins:3, dev:0x48, reg:0x40e, val:0x1e [MCU2_0] 542.355387 s: i2c write: Ins:3, dev:0x48, reg:0x40f, val:0x0 [MCU2_0] 542.360385 s: i2c write: Ins:3, dev:0x48, reg:0x410, val:0x0 [MCU2_0] 542.365388 s: i2c write: Ins:3, dev:0x48, reg:0x411, val:0x1 [MCU2_0] 542.370387 s: i2c write: Ins:3, dev:0x48, reg:0x412, val:0x1 [MCU2_0] 542.375387 s: i2c write: Ins:3, dev:0x48, reg:0x330, val:0x4 [MCU2_0] 542.380387 s: i2c write: Ins:3, dev:0x48, reg:0x44a, val:0xd0 [MCU2_0] 542.385387 s: i2c write: Ins:3, dev:0x48, reg:0x320, val:0x24 [MCU2_0] 542.390387 s: i2c write: Ins:3, dev:0x48, reg:0x325, val:0x80 [MCU2_0] 542.395386 s: i2c write: Ins:3, dev:0x48, reg:0x319, val:0x8 [MCU2_0] 542.400388 s: i2c write: Ins:3, dev:0x48, reg:0x316, val:0x5e [MCU2_0] 542.405387 s: i2c write: Ins:3, dev:0x48, reg:0x317, val:0xe [MCU2_0] 542.410386 s: i2c write: Ins:3, dev:0x48, reg:0x31d, val:0xc0 [MCU2_0] 542.415388 s: i2c write: Ins:3, dev:0x48, reg:0x1da, val:0x18 [MCU2_0] 542.420388 s: i2c write: Ins:3, dev:0x48, reg:0x1fa, val:0x18 [MCU2_0] 542.425387 s: i2c write: Ins:3, dev:0x48, reg:0xb0f, val:0x8 [MCU2_0] 542.430387 s: i2c write: Ins:3, dev:0x48, reg:0xc0f, val:0x8 542.635601 s: ISS: Initializing sensor [S_OX01_9296_96705_1K_S_CH1] ... Done !!! [MCU2_0] 542.635387 s: IM_SENSOR_CMD_CONFIG returning status = 0 Scaler is disabled 542.643076 s: ISS: Starting sensor [S_OX01_9296_96705_1K_S_CH1] ... !!! ========================== Demo : Single Camera w/ 2A ========================== p: Print performance statistics s: Save Sensor RAW, VISS Output and H3A output images to File System e: Export performance statistics u: Update DCC from File System x: Exit Enter Choice: Unsupported command ========================== Demo : Single Camera w/ 2A ========================== p: Print performance statistics s: Save Sensor RAW, VISS Output and H3A output images to File System e: Export performance statistics u: Update DCC from File System x: Exit Enter Choice: [MCU2_0] 542.643377 s: ImageSensor_RemoteServiceHandler: IM_SENSOR_CMD_STREAM_ON [MCU2_0] 542.643464 s: IM_SENSOR_CMD_STREAM_ON: channel_mask = 0x1 [MCU2_0] 542.643514 s: start streaming [MCU2_0] 542.643543 s: i2c write: Ins:3, dev:0x48, reg:0x313, val:0x42 [MCU2_0] 542.844203 s: Reg: 0x313: val: 0x42 [MCU2_0] 542.894188 s: Reg: 0x1dc: val: 0x 0 [MCU2_0] 542.944185 s: Reg: 0x1fc: val: 0x 1 [MCU2_0] 542.994182 s: Reg: 0x21c: val: 0x 0 [MCU2_0] 543.044186 s: Reg: 0x23c: val: 0x 0 [MCU2_0] 543.094181 s: Reg: 0x3e0: val: 0x e [MCU2_0] 543.194182 s: Reg: 0x127: val: 0x40 543.293582 s: ISS: Starting sensor [S_OX01_9296_96705_1K_S_CH1] ... !!! :# ===== 其它注意事项 ===== ==== 软件开发环境建立 ==== === 使用EVM板 === 可以直接使用,具体使用方法,请参考官方文档。 === 使用SK板 === 需要对SDK进行一些修改,请参考文档 [[tda4系列:利用starter-kit开发板开发rtos应用]] ==== 解串的地址 ==== MAX9296的默认地址 ** CH0: 0x48 ** CH1: 0x4a ==== 默认工作模式及修改 ==== === 默认工作模式 === CH0, CH1的MAX9296的默认工作模式均为:GMSL2, 6Gbps. === 通过硬件跳线修改默认工作模式 === Max9296 支持GMSL1/GMSL2, 3G/6G, coax/stp, i2c/uart 等在上电时通过分压电阻进行配置。这些配置不建议修改,但如需修改,推荐使用I2C修改寄存器的方式修改。如果确需要修改硬件,参考下图: {{ :扩展卡:whiteboard_exported_image_3_.png?direct&600 |}} 电阻的选择请参考 美信 数据手册。 === 通过软件I2C配置工作模式 === 使用I2C修改GMSL模式,参考如下代码,可以在不变更硬件的情况下,在GMSL1/GMSL2模式下切换。 具体操作,请参考:[[GMSL相关文章:软件修改MAX9296的模式及速率]] 。 ==== 配置帧同步信号 ==== 使用多个摄像头需要进行同步。当MAX9296工作于GMSL1,或GMSL2模式时,其同步配置是不同的。 具体的操作及配置,请参考:[[GMSL相关文章:MAX9296的多相机FSYNC配置]].