Page tree

Contact: sales@inno-maker.com / support@inno-maker.com /
Download: wiki.inno-maker.com

Skip to end of metadata
Go to start of metadata

Note

  • The latest Raspberry PI OS(Kernel 5.4)driver already support cam-mipi327raw; 

  • Current vcmipidemp program is not fully supported pi4 due to frame buffer;

  • Drivers difference between Inno-maker and raspberry pi os;

Inno-maker driver

Raspberry PI OS driver
Mode0 1920×1080 30fps,SRGGB10P
Mode1 1920×1080 60fps, SRGGB10P.
Mode2 1920×1080 50fps, SRGGB12P.
Mode0 1920×1080 30fps,SRGGB10P 


Use Inno-Maker Driver

Install Drivers And System Setup

  • Step1 Download firmware

  • Step2 Enable your Device

    • $sudo nano /boot/config.txt

    #Add Below To the last line then save
    dtparam=i2c_vc=on
    dtoverlay=vc_mipi_imx327c

    • $sudo nano /boot/cmdline.txt

    #Add Below To the last line then save
    cma=128M

  • Step3 Install drivers for your hardware (We take PI4 and Kernel 4.19.57 (date19.7.10) for example)

    • $cd cam-mipi327raw
    • $sudo chmod -R a+rwx *
    • $uname -a                          #Check system version
    • $cd Linux_4.19.57/pi4        #IF Your Hardware is PI3,Linux_4.19.97, it should be "$cd Linux_4.19.97/pi3"
    • $make install                     #Intall Driver For CAM-MIPI327RAW
    • $sudo reboot

You will see below information that means successful

  • Step3 Set Working Mode 

    • $cd cam-mipi327raw/Linux_4.19.57/pi4
    • $make setmode1  #set this module work in mode1

You will see below information

Mode Instruction
This module support 3 work modes.
Mode0: 1920x1080 30fps, SRGGB10P (option,with 37.125MHZ OSC)
Mode1: 1920x1080 60fps, SRGGB10P
Mode2: 1920x1080 50fps, SRGGB12P
Note : by default this module’s hardware with 74.25MHZ OSC so it can’t work at Mode0.
Make setmode1 to set this module work in mode1.

Test For Linux Kernel Under 5.4

  • 1,Frame rate test

    • $ v4l2-ctl --stream-mmap --stream-count=-1 -d /dev/video0 --stream-to=/dev/null

It will show you a frames-per-second information of your module,press ctrl+c to stop.

  • 2,Sample programs1:vcmipidemo

    • $cd
    • $cd cam-mipi327raw/tools
    • $./vcmipidemo -s 3000 -g 0x88 -f >/dev/null

It can setting the shutter and gain value of this module and capture the frame into frame buffer or PPM file.
It will setting the shutter to 3ms ,gain value to 0x88 and copy the capture frame into framebuffer.
More detail please use ./vcmipidemo --help
-s: setting the shutter : range: 29us to 1S ,unit us
-g: setting the sensor gain: range 0-----240d

  • 3, Sample programs2: using the camera for capture frames into file

  • $./v4l2_capture_raw12 -s 3000 -g 0x88 -h 1 -v 1 -c 5

Capture y12 format output into file while module work in mode2
-s: setting the shutter : range: 8721ns to 8721*885ns ,unit ns
-g: setting the sensor gain: range 0-----254d
-h: horizon flip
-v:vertical flip
-c:capture count
More detail please use ./v4l2_capture_raw12  --help

  • $./v4l2_capture_raw10 -s 3000 -g 0x88 -h 1 -v 1 -c 5

Capture y10 format output into file while module work in mode0 or mode1
-s: setting the shutter : range: 29us to 1S ,unit us
-g: setting the sensor gain: range 0-----240d
-h: horizon flip
-v:vertical flip
-c:capture count
More detail please use./v4l2_capture_raw10 --help

  • $./raw10p2raw8 <y10file name> <y8file name>

tools to handle y10 captured file into 8bit gray formate
./raw10p2raw8 <file_input> <file_output>

Test For Linux Kernel Above 5.4

  • 1,Frame rate test

    • $ v4l2-ctl --stream-mmap --stream-count=-1 -d /dev/video0 --stream-to=/dev/null

It will show you a frames-per-second information of your module,press ctrl+c to stop.

  • 2,Sample programs1:vcmipidemo

    • $cd
    • $cd cam-mipi327raw/tools
    • $./vcmipidemo-1028 -s 3000 -g 0x88 -f >/dev/null

It can setting the shutter and gain value of this module and capture the frame into frame buffer or PPM file.
It will setting the shutter to 3ms ,gain value to 0x88 and copy the capture frame into framebuffer.
More detail please use ./vcmipidemo-1028 --help
-s: setting the shutter : range: 29us to 1S ,unit us
-g: setting the sensor gain: range 0-----240d

  • 3, Sample programs2:using the camera for capture frames into file

    • $./v4l2_capture_raw12 -s 3000 -g 0x88 -h 1 -v 1 -c 5

Capture y12 format output into file while module work in mode2
-s: setting the shutter : range: 8721ns to 8721*885ns ,unit ns
-g: setting the sensor gain: range 0-----254d
-h: horizon flip
-v:vertical flip
-c:capture count
More detail please use ./v4l2_capture_raw12 --help

  • $./v4l2_capture_raw10 -s 3000 -g 0x88 -h 1 -v 1 -c 5

Capture y10 format output into file while module work in mode0 or mode1
-s: setting the shutter : range: 29us to 1S ,unit us
-g: setting the sensor gain: range 0-----240d
-h: horizon flip
-v:vertical flip
-c:capture count
More detail please use./v4l2_capture_raw10 --help

  • $./raw10p2raw8 <y10file name> <y8file name>

tools to handle y10 captured file into 8bit gray formate
./raw10p2raw8 <file_input> <file_output>

Use Raspberry PI OS Driver(Default Driver)

System Setup For Raspberry PI OS

Step1 Download tools

  • $sudo nano /boot/config.txt

#Add Below To the last line then save
dtparam=i2c_vc=on
dtoverlay=imx290,clock-frequency=74250000     

  • $sudo nano /boot/cmdline.txt

#Add Below To the last line then save
cma=128M

  • sudo reboot
  • ls /dev/video*
#Then you'll see video0 

Test 

  • 1,Frame rate test

    • $ v4l2-ctl --stream-mmap --stream-count=-1 -d /dev/video0 --stream-to=/dev/null

It will show you a frames-per-second information of your module,press ctrl+c to stop

  • 2,Sample programs1:vcmipidemo (Only support PI3)

    • $cd cam-mipi327raw
    • $chmod -R a+rwx *
    • $cd cam-mipi327raw/tools
    • $./vcmipidemo-1028 -s 500 -g 0x68 -a -w  '67 115 70' -f    

It can setting the shutter and gain value of this module and capture the frame into frame buffer or PPM file.
More detail please use ./vcmipidemo-1028 --help

Usage: ./vcmipidemo-1028 [-s sh] [-g gain] [-i nr] [-f] [-a] [-o]
-s, Shutter Time.
-g, Gain Value.
-i, This Number of Images will be recorded, else continuously.
-b, Buffer Count to use.
-f, Output Capture to framebuffer /dev/fb0.
-o, Output Captures to file in PGM or PPM format (openable by e.g. GIMP)
-a, Suppress ASCII capture at stdout.
-d, Video device ID: /dev/videoX, default for X: 0
-w, Followed by White Balance Settings as Triple (each [1..255]): 'wr wg wb'
or 0 0 0 to determine these values by recording a white surface - adjust
the shutter time so that all measured values are smaller than 200.
For example: -w '123 145 167'
Note that you may need also apply an IR filter for better visual colors.
-r, Region of interest: (Left,Top)/WidthxHeight'
For example: -r '(0,0)/640x480'
Attention: The ROI setting will only work properly if
Platform specific and Module specific Limitations are satisfied!
and the ROI setting stays changed after the program ends.

Remark:

How to get the shutter range and sensor gain:$v4l2-ctl -l

User Controls

exposure 0x00980911 (int) : min=45 max=1121 step=1 default=1121 value=300
gain 0x00980913 (int) : min=0 max=238 step=1 default=0 value=104
horizontal_flip 0x00980914 (bool) : default=0 value=0
vertical_flip 0x00980915 (bool) : default=0 value=0

  • 3, Sample programs2:using the camera for capture frames into file

  • $./v4l2_capture_raw10 -s 3000 -g 0x88 -h 1 -v 1 -c 5


-s: 
-g: 
-h: 
-v:
-c:
More detail please use./v4l2_capture_raw10 --help

Usage: ./v4l2_capture_raw10 [-s sh] [-g gain] [-h f] [-v f] [-c cnt]

-s, Shutter Time.
-g, Gain Value.
-h, horizen flip.
-v, vertical flip
-c, capture count

  • $./raw10p2raw8 <y10file name> <y8file name>

tools to handle y10 captured file into 8bit gray formate
./raw10p2raw8 <file_input> <file_output>

  • No labels