Changes

Jump to navigation Jump to search
3,121 bytes added ,  14:37, 18 August 2023
Line 22: Line 22:  
<code>./camera_i2c_config</code>
 
<code>./camera_i2c_config</code>
   −
*for RPI Computer Module
+
*for RPI Computer Module 3
    
<code>./camera_i2c_config [cameranum]</code>
 
<code>./camera_i2c_config [cameranum]</code>
Line 38: Line 38:  
./cs_mipi_i2c.sh
 
./cs_mipi_i2c.sh
   −
this shell scripts should be used for CS-MIPI-IMX307!
+
this shell scripts should be used for CS-MIPI-X!
    
Usage:  ./cs_mipi_i2c.sh [-r/w] [-f] function name -p1 param1 -p2 param2 -p3 param3 -b bus
 
Usage:  ./cs_mipi_i2c.sh [-r/w] [-f] function name -p1 param1 -p2 param2 -p3 param3 -b bus
Line 59: Line 59:     
    -d [i2c addr]                  i2c addr if not default 0x3b
 
    -d [i2c addr]                  i2c addr if not default 0x3b
 +
=== i2c bus number on different board ===
 +
Please refer to the following article to determine which -b parameter you need to use.
   −
support functions: devid,hdver,camcap,firmwarever,productmodel,videofmtcap,videofmt,ispcap,i2caddr,streammode,powerhz,
+
[[I2c bus number and video node|i2c bus number on different boards]]
 
+
===Functions list===
daynightmode ,hue ,contrast , satu , expostate , wbstate ,expmode , aetarget, aetime,aeagc,metime ,meagain , medgain , awbmode , mwbcolortemp , mwbgain,imagedir,sreg,striggerone,triggeredge,autotgcnt,tgdebncr,tgdly,pickmode,discardfrm,pickone,mipistatus,sysreboot,sysreset,paramsave
  −
 
  −
 
  −
Pi3B / Pi3B+ / 3A / 4B(1G/2G/4G),we use i2c0
  −
 
  −
Compute Module/ CM3,we use i2c1,please add '''-b 1''' option.
   
=====devid=====
 
=====devid=====
 
<code>./cs_mipi_i2c.sh -r -f devid</code>
 
<code>./cs_mipi_i2c.sh -r -f devid</code>
Line 76: Line 72:  
|}
 
|}
 
=====hdver=====
 
=====hdver=====
<code>./veye_mipi_i2c.sh -r -f hdver</code>
+
<code>./cs_mipi_i2c.sh -r -f hdver</code>
    
get hardware logic version
 
get hardware logic version
Line 127: Line 123:  
<code>./cs_mipi_i2c.sh -r -f videofmt</code>
 
<code>./cs_mipi_i2c.sh -r -f videofmt</code>
    +
====== old version videofmt write ======
 
<code>./cs_mipi_i2c.sh -w -f videofmt -p1 1920 -p2 1080 -p3 10</code>
 
<code>./cs_mipi_i2c.sh -w -f videofmt -p1 1920 -p2 1080 -p3 10</code>
   Line 147: Line 144:  
CS-MIPI-SC132framerate range: [2,maxframerate]  
 
CS-MIPI-SC132framerate range: [2,maxframerate]  
   −
note:sync mode do not support '''framerate continuously adjustable.'''  
+
note:sync mode do not support '''framerate continuously adjustable.'''
 +
 
 +
====== new version videofmt write ======
 +
Note:  supported on CS-MIPI-IMX307 firmware > V2.35.
 +
 
 +
<code>./cs_mipi_i2c.sh -w -f videofmt -p1 1920 -p2 1080 -p4 0.20</code>
 +
 
 +
p4 parameter, which supports the decimal frame rate function and is used to support manual exposure mode for more than 1 second.
 
=====ispcap=====
 
=====ispcap=====
 
<code>./cs_mipi_i2c.sh -r -f ispcap</code>
 
<code>./cs_mipi_i2c.sh -r -f ispcap</code>
   −
get camera isp capbility. Will add details later.
+
get camera isp capbility.
 +
 
 +
bit0 : CSC hue,contrast,saturation
 +
 
 +
bit1 : AE auto exposure
 +
 
 +
bit2 : ME manual exposure
 +
 
 +
bit3 : AWB auto white balance
 +
 
 +
bit4 : MWB  manual white balance
 +
 
 +
bit5 : DME  direct manual exposure
 
=====powerhz=====
 
=====powerhz=====
 
<code>./cs_mipi_i2c.sh -r -f powerhz</code>
 
<code>./cs_mipi_i2c.sh -r -f powerhz</code>
Line 235: Line 251:  
sync mode :[[Camera module Stream Mode manual/zh|Camera module Stream Mode manual]]
 
sync mode :[[Camera module Stream Mode manual/zh|Camera module Stream Mode manual]]
   −
Note: only supported on camcap bit 0 is 1.
+
In sync mode,do not support '''framerate continuously adjustable.'''
 +
 
 +
If powerhz is 60,support 1080p@30,720p@60,vga@130.
 +
 
 +
If powerhz is 50,support 1080p@25,720p@50,vga@130.
 +
 
 +
Note: only supported on camcap bit 0 is 1. Streammode is the base, and parameters such as exposure need to be reconfigured after modifying streammode.
    
*Trigger mode
 
*Trigger mode
Line 323: Line 345:     
1: manual exposure
 
1: manual exposure
 +
 +
2: direct manual exposure,skip isp,write to sensor registers. CS-MIPI-SC132 only.
 
=====aetarget=====
 
=====aetarget=====
 
<code>./cs_mipi_i2c.sh -r -f aetarget</code>
 
<code>./cs_mipi_i2c.sh -r -f aetarget</code>
Line 334: Line 358:  
<code>./cs_mipi_i2c.sh -r -f aetime</code>
 
<code>./cs_mipi_i2c.sh -r -f aetime</code>
   −
<code>./cs_mipi_i2c.sh -w -f aetime -p1 0x400000</code>
+
<code>./cs_mipi_i2c.sh -w -f aetime -p1 400000</code>
    
the max exposure time in  automatic exposure mode,unit: us。Effective when '''expmode''' is auto.
 
the max exposure time in  automatic exposure mode,unit: us。Effective when '''expmode''' is auto.
Line 365: Line 389:     
range:[0-1000000/framerate]
 
range:[0-1000000/framerate]
 +
 +
If you need ultra-long exposure, you need to adjust the framerate to match this parameter.
 
=====meagain=====
 
=====meagain=====
 
<code>./cs_mipi_i2c.sh -w -f meagain -p1 X -p2 Y</code>
 
<code>./cs_mipi_i2c.sh -w -f meagain -p1 X -p2 Y</code>
Line 385: Line 411:     
manual dgain,dB. Effective when '''expmode''' is manual.
 
manual dgain,dB. Effective when '''expmode''' is manual.
 +
 +
X is the integer part and Y is the decimal part, for example X is 2 and Y is 3 means 2.3dB.
 +
 +
X range: depending on sensor.
 +
 +
Y range: [0-9].
 +
 +
IMX307,dgain range is[0,42]dB, step 0.3dB.
 +
=====dmetime=====
 +
<code>./cs_mipi_i2c.sh -r -f dmetime</code>
 +
 +
<code>./cs_mipi_i2c.sh -w -f dmetime -p1 10000</code>
 +
 +
direct manual exposure time, us.  Effective when '''expmode''' is direct manual.
 +
 +
range:[0-1000000/framerate]
 +
 +
If you need ultra-long exposure, you need to adjust the framerate to match this parameter.
 +
=====dmeagain=====
 +
<code>./cs_mipi_i2c.sh -w -f dmeagain -p1 X -p2 Y</code>
 +
 +
<code>./cs_mipi_i2c.sh -r -f dmeagain</code>
 +
 +
direct manual again,dB. Effective when '''expmode''' is direct manual.
 +
 +
X is the integer part and Y is the decimal part, for example X is 2 and Y is 3 means 2.3dB.
 +
 +
X range: depending on sensor.
 +
 +
Y range: [0-9].
 +
 +
IMX307,again range is[0,27]dB, step 0.3dB.
 +
=====dmedgain=====
 +
<code>./cs_mipi_i2c.sh -w -f dmedgain -p1 X -p2 Y</code>
 +
 +
<code>./cs_mipi_i2c.sh -r -f dmedgain</code>
 +
 +
direct manual dgain,dB. Effective when '''expmode''' is direct manual.
    
X is the integer part and Y is the decimal part, for example X is 2 and Y is 3 means 2.3dB.
 
X is the integer part and Y is the decimal part, for example X is 2 and Y is 3 means 2.3dB.
Line 408: Line 472:  
<code>./cs_mipi_i2c.sh -r -f mwbgain</code>
 
<code>./cs_mipi_i2c.sh -r -f mwbgain</code>
   −
manual  white balance mode, set rgain and dgain manually, ggain is always 1.
+
manual  white balance mode, set rgain and bgain manually, ggain is always 1.
    
GAIN is 4-bit decimal precision, for example: 0x23 means 2+3/16=2.19.
 
GAIN is 4-bit decimal precision, for example: 0x23 means 2+3/16=2.19.
Line 420: Line 484:  
<code>./cs_mipi_i2c.sh -r -f expostate</code>
 
<code>./cs_mipi_i2c.sh -r -f expostate</code>
   −
readonly, get the current exposure state.  exposure time, again and dgain.
+
readonly, get the current exposure state.  exposure time, again and dgain. direct manual exposure mode invalid.
 
=====wbstate=====
 
=====wbstate=====
 
<code>./cs_mipi_i2c.sh -r -f wbstate</code>
 
<code>./cs_mipi_i2c.sh -r -f wbstate</code>
Line 486: Line 550:     
=====tgdebncr=====
 
=====tgdebncr=====
<code>./cs_mipi_i2c.sh -w -f triggeredge -p1 enable -p2 [value]</code>
+
<code>./cs_mipi_i2c.sh -w -f tgdebncr -p1 enable -p2 [value]</code>
   −
<code>./cs_mipi_i2c.sh -r -f triggeredge</code><br />In Hardware Trigger mode,the debouncer attribute of the trigger signal.  
+
<code>./cs_mipi_i2c.sh -r -f tgdebncr</code><br />In Hardware Trigger mode,the debouncer attribute of the trigger signal.  
    
Any trigger signal that is less than value (us) will be ignored.
 
Any trigger signal that is less than value (us) will be ignored.
Line 500: Line 564:  
Trigger delay in Hardware Trigger mode (us).<br />note: Only CS-MIPI-SC132 Support.
 
Trigger delay in Hardware Trigger mode (us).<br />note: Only CS-MIPI-SC132 Support.
 
=====pickmode=====
 
=====pickmode=====
<code>./cs_mipi_i2c.sh -w -f pickmode -p1 enable</code>
+
<code>./cs_mipi_i2c.sh -w -f pickmode -p1 [0/1]</code>
    
<code>./cs_mipi_i2c.sh -r -f pickmode</code>
 
<code>./cs_mipi_i2c.sh -r -f pickmode</code>
Line 521: Line 585:  
|-
 
|-
 
|1
 
|1
|Restart the problem
+
|Restart the main program
 
|-
 
|-
 
|2
 
|2
Line 533: Line 597:     
If enabled, the Strobe IO pin outputs a high level when the sensor is exposed.
 
If enabled, the Strobe IO pin outputs a high level when the sensor is exposed.
 +
[[File:Trigger and Led-strobe.png|alt=Trigger and Led-strobe|none|thumb|Trigger and Led-strobe]]
 +
 +
note: Only CS-MIPI-SC132 Support.
 +
 +
===== expfrmmode =====
 +
<code>./cs_mipi_i2c.sh -w -f expfrmmode -p1 [value]</code>
 +
 +
<code>./cs_mipi_i2c.sh -r -f expfrmmode</code>
 +
{| class="wikitable"
 +
|+expfrmmode
 +
!value
 +
!description
 +
|-
 +
|0
 +
|slow shutter mode
 +
|-
 +
|1
 +
|fix framerate mode(default)
 +
|}
 +
Effective in auto exposure mode.
 +
 +
The slow shutter mode is usually used  to reduce picture noise  in low-illumination scenes by automatic frame reduction.
 +
 +
It needs to be used with the '''aetime,slowshuttergain''' parameter.
 +
 +
Note: only supported on firmware version >= 2.32
 +
=====slowshuttergain=====
 +
<code>./cs_mipi_i2c.sh -w -f slowshuttergain -p1 X -p2 Y</code>
 +
 +
<code>./cs_mipi_i2c.sh -r -f slowshuttergain</code>
 +
 +
In slow shutter mode,the threshold of Gain be begin to drop frame, dB. Effective when '''expfrmmode''' is slow shutter mode.
 +
 +
X is the integer part and Y is the decimal part, for example X is 2 and Y is 3 means 2.3dB.
 +
 +
X range: depending on sensor.
 +
 +
Y range: [0-9].
 +
 +
Note: only supported on firmware version >= 2.32
 +
 +
===== yuvseq =====
 +
<code>./veye_mipi_i2c.sh -w -f yuvseq -p1 YUYV</code>
 +
 +
<code>./veye_mipi_i2c.sh -w -f yuvseq -p1 UYVY</code>
 +
 +
<code>./veye_mipi_i2c.sh -r -f yuvseq</code>
 +
 +
Set yuv seq of camera.
   −
note: Only CS-MIPI-SC132 Support.<br />
+
Note: only supported on firmware version >= 2.38<br />

Navigation menu