Difference between revisions of "VEYE-MIPI-290/327 i2c/zh"

From wiki_veye
Jump to navigation Jump to search
Line 1: Line 1:
 
<br />
 
<br />
  
= veye_mipi_i2c.sh详细说明 =
+
=veye_mipi_i2c.sh详细说明=
  
== 介绍 ==
+
==介绍==
 
目录下总共4个文件,camera_i2c_config、i2c_read、i2c_write、veye_mipi_i2c.sh。
 
目录下总共4个文件,camera_i2c_config、i2c_read、i2c_write、veye_mipi_i2c.sh。
  
 
你需要先运行camera_i2c_config配置管脚,然后执行veye_mipi_i2c.sh。
 
你需要先运行camera_i2c_config配置管脚,然后执行veye_mipi_i2c.sh。
  
== camera_i2c_config USAGE ==
+
<br />
本脚本实现I2C总线管脚复用的配置。
 
  
==== 对于Computer Module ====
+
==veye_mipi_i2c.sh USAGE==
'''硬件连接:'''
 
 
 
使用我们提供的树莓派增强款套装,连接camera模组到CMIO底板。
 
 
 
当使用CAM1时:
 
 
 
Attach CD1_SDA (J6 pin 37) to GPIO2 (J5 pin 5).
 
 
 
Attach CD1_SCL (J6 pin 39) to GPIO3 (J5 pin 7).
 
 
 
当使用CAM0时:
 
 
 
Attach CD0_SDA (J6 pin 45) to GPIO44 .
 
 
 
Attach CD0_SCL (J6 pin 47) to GPIO45 .
 
 
 
'''软件配置'''
 
 
 
Download dt-blob.bin from [here],(<nowiki>https://www.raspberrypi.org/documentation/hardware/computemodule/dt-blob-dualcam.bin</nowiki> “here”) rename it to dt-blob.bin and place it in /boot/,then
 
 
 
<code>./camera_i2c_config [cameranum]</code>
 
 
 
==== 其他 ====
 
<code>./camera_i2c_config</code>
 
 
 
== veye_mipi_i2c.sh USAGE ==
 
 
./veye_mipi_i2c.sh
 
./veye_mipi_i2c.sh
  
Line 60: Line 33:
 
support functions: devid,hdver,wdrmode,videoformat,mirrormode,denoise,agc,lowlight,daynightmode,ircutdir,irtrigger
 
support functions: devid,hdver,wdrmode,videoformat,mirrormode,denoise,agc,lowlight,daynightmode,ircutdir,irtrigger
  
=== 使用详解 ===
+
===使用详解===
  
* devid
+
*devid
  
 
  <code>./veye_mipi_i2c.sh -r -f devid</code>
 
  <code>./veye_mipi_i2c.sh -r -f devid</code>
Line 82: Line 55:
 
|}
 
|}
  
* hdver
+
*hdver
  
 
  <code>./veye_mipi_i2c.sh -r -f hdver</code>
 
  <code>./veye_mipi_i2c.sh -r -f hdver</code>
Line 93: Line 66:
 
|}
 
|}
  
* wdrmode
+
*wdrmode
  
 
  <code>./veye_mipi_i2c.sh -r -f wdrmode
 
  <code>./veye_mipi_i2c.sh -r -f wdrmode
Line 114: Line 87:
 
|}
 
|}
  
* videoformat
+
*videoformat
  
 
  <code>./veye_mipi_i2c.sh -r -f videoformat
 
  <code>./veye_mipi_i2c.sh -r -f videoformat
Line 130: Line 103:
 
|}
 
|}
  
* mirrormode
+
*mirrormode
  
 
  <code>./veye_mipi_i2c.sh -r -f mirrormode
 
  <code>./veye_mipi_i2c.sh -r -f mirrormode
Line 151: Line 124:
 
|}
 
|}
  
* denoise
+
*denoise
  
 
  <code>./veye_mipi_i2c.sh -r -f denoise
 
  <code>./veye_mipi_i2c.sh -r -f denoise
Line 208: Line 181:
 
|}
 
|}
  
* agc
+
*agc
  
 
  <code>./veye_mipi_i2c.sh -r -f agc
 
  <code>./veye_mipi_i2c.sh -r -f agc
Line 220: Line 193:
 
|}
 
|}
  
* lowlight
+
*lowlight
  
 
  <code>./veye_mipi_i2c.sh -r -f lowlight
 
  <code>./veye_mipi_i2c.sh -r -f lowlight
Line 259: Line 232:
 
|}
 
|}
  
* daynightmode
+
*daynightmode
  
 
  <code>./veye_mipi_i2c.sh -r -f daynightmode
 
  <code>./veye_mipi_i2c.sh -r -f daynightmode

Revision as of 16:40, 19 July 2019


1 veye_mipi_i2c.sh详细说明

1.1 介绍

目录下总共4个文件,camera_i2c_config、i2c_read、i2c_write、veye_mipi_i2c.sh。

你需要先运行camera_i2c_config配置管脚,然后执行veye_mipi_i2c.sh。


1.2 veye_mipi_i2c.sh USAGE

./veye_mipi_i2c.sh

Usage: ./veye_mipi_i2c.sh [-r/w] [-f] function name -p1 param1 -p2 param2 -b bus

options:

-r read

-w write

-f [function name] function name

-p1 [param1] param1 of each function

-p2 [param1] param2 of each function

-b [i2c bus num] i2c bus number

function list and param,ref to [veye_mipi_290_isp_function_and_param.pdf]

support functions: devid,hdver,wdrmode,videoformat,mirrormode,denoise,agc,lowlight,daynightmode,ircutdir,irtrigger

1.2.1 使用详解

  • devid
./veye_mipi_i2c.sh -r -f devid
value description
0x02 MIPI, WDRDisable, 2Lane
0x22 MIPI, WDREnable, 2Lane
0x13 LVDS,WDRDisable,3Lane
0x33 LVDS,WDREnable,3Lane
  • hdver
./veye_mipi_i2c.sh -r -f hdver
value description
0xXX Version
  • wdrmode
./veye_mipi_i2c.sh -r -f wdrmode
./veye_mipi_i2c.sh -w -f wdrmode -p1 [value]
value description
0x00 Back Light Mode OFF
0x01 Back Light Mode ON, LOW
0x02 Back Light Mode ON, HIGH
0x03 WDR Enable
  • videoformat
./veye_mipi_i2c.sh -r -f videoformat
./veye_mipi_i2c.sh -w -f videoformat -p1 [value]

WARNING:THIS FUNCTION MUST BE CALLED BEFORE ANY video applications

value description
PAL PAL(50Hz)
NTSC NTSC(60Hz)
  • mirrormode
./veye_mipi_i2c.sh -r -f mirrormode
./veye_mipi_i2c.sh -w -f mirrormode -p1 [value]
value description
0x00 Normal
0x01 Mirror
0x02 V-Flip
0x03 Mirror And V-Flip(180 Degree Rotate)
  • denoise
./veye_mipi_i2c.sh -r -f denoise
./veye_mipi_i2c.sh -w -f denoise -p1 [value]
value description
0x00 NR 2D Mode = OFF; NR 3D Mode = OFF
0x01 NR 2D Mode = OFF; NR 3D Mode = LOW
0x02 NR 2D Mode = OFF; NR 3D Mode = MIDDLE
0x03 NR 2D Mode = OFF; NR 3D Mode = HIGH
0x04 NR 2D Mode = LOW; NR 3D Mode = OFF
0x05 NR 2D Mode = LOW; NR 3D Mode = LOW
0x06 NR 2D Mode = LOW; NR 3D Mode = MIDDLE
0x07 NR 2D Mode = LOW; NR 3D Mode = HIGH
0x08 NR 2D Mode =MIDDLE; NR 3D Mode = OFF
0x09 NR 2D Mode =MIDDLE; NR 3D Mode = LOW
0x0A NR 2D Mode = MIDDLE; NR 3D Mode = MIDDLE
0x0B NR 2D Mode = MIDDLE; NR 3D Mode = HIGH
0x0C NR 2D Mode =HIGH; NR 3D Mode = OFF
0x0D NR 2D Mode =HIGH; NR 3D Mode = LOW
0x0E NR 2D Mode = HIGH; NR 3D Mode = MIDDLE
0x0F NR 2D Mode = HIGH; NR 3D Mode = HIGH
  • agc
./veye_mipi_i2c.sh -r -f agc
./veye_mipi_i2c.sh -w -f agc -p1 [value]
value description
0x00~0x0F AGC intensity
  • lowlight
./veye_mipi_i2c.sh -r -f lowlight
./veye_mipi_i2c.sh -w -f lowlight -p1 [value]
value description
0x01 1/2*(FRAME RATE)
0x03 1/4*(FRAME RATE)
0x05 1/6*(FRAME RATE)
0x07 1/8*(FRAME RATE)
0x09 1/10*(FRAME RATE)
0x0B 1/15*(FRAME RATE)
0x0D 1/20*(FRAME RATE)
0x0F 1/25*(FRAME RATE)
0x11 1/30*(FRAME RATE)
0x00 Fixed frame rate (25/30)
  • daynightmode
./veye_mipi_i2c.sh -r -f daynightmode
./veye_mipi_i2c.sh -w -f daynightmode -p1 [value]
value description
0xFF Color Mode
0xFE Black&White Mode
0xFC Trigger Mode