目录

双MAX9296-GMSL2摄像头接入扩展板

主要特征

发货清单

总体结构

(随版本更新,上图会略有差异, 请以板上丝印为准)

基本参数

安装与连接

注意,必须使用合适的支撑柱及螺丝进行安装,否则可能影响稳定性

SK板安装

如图所示, 扩展板与主板之间使用3颗直径2.5mm, 高5mm 的铜柱支撑。

EVM板安装

如图所示, 扩展板与主板之间使用3颗直径2.5mm, 高11mm 的铜柱支撑。

连接电源

必须使用主板官方指定的电源, 并保证足够的功率, 否则运行过程中可能会非预期重启。

连接GMSL相机

还没有GMSL相机?可以试试揖越的GMSL视频输入设备:gmsl2摄像头

快速上手

请参数上述步骤连接主板与扩展卡。必须保持二者的连接可靠。不可靠连接可能导致工作不正常甚至损坏硬件。

附带的SD卡,预设置了一些出厂适配完成的摄像头/视频源,分别为:

  • 森云 IMX390
  • HDMI转GMSL2 视频注入 (本公司产品)

其它测试使用相机,可以参考[] 请注意相机电压与扩展板供电电压是否匹配

插入附带的SD卡。目前仅提供SK板的测试用SD卡。此卡官方SK板镜像相比,做了如下修改:

  • 显示改为由R5控制
  • 视频输入使用RTOS,OPENVX框架,由R5控制
  • 神经网络运行,openvx框架, OSRT支持受限

连接显示器、网线, 串口线。使用HDMI连接显示器 (默认使用HDMI显示),网线主要用于调试。

插上供电口USB (sk板),确认扩展板指示灯显示正常。需要注意:

  • Type-C USB的供电功率是否充足,推荐使用笔记本电源
  • 摄像头GMSL的POC电源跳线是否接上

(各个Channel的供电由GPIO控制,可不用跳线)

上电进入terminal,需运行以下脚本,建立工作环境。

点击以显示 ⇲

点击以隐藏 ⇱

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进行一些修改,请参考文档 利用Starter-Kit开发板开发RTOS应用

解串的地址

MAX9296的默认地址

默认工作模式及修改

默认工作模式

CH0, CH1的MAX9296的默认工作模式均为:GMSL2, 6Gbps.

通过硬件跳线修改默认工作模式

Max9296 支持GMSL1/GMSL2, 3G/6G, coax/stp, i2c/uart 等在上电时通过分压电阻进行配置。这些配置不建议修改,但如需修改,推荐使用I2C修改寄存器的方式修改。如果确需要修改硬件,参考下图:

电阻的选择请参考 美信 数据手册。

通过软件I2C配置工作模式

使用I2C修改GMSL模式,参考如下代码,可以在不变更硬件的情况下,在GMSL1/GMSL2模式下切换。 具体操作,请参考:软件修改MAX9296的模式及速率

配置帧同步信号

使用多个摄像头需要进行同步。当MAX9296工作于GMSL1,或GMSL2模式时,其同步配置是不同的。 具体的操作及配置,请参考:MAX9296的多相机FSYNC配置.