Changes

Jump to navigation Jump to search
Line 114: Line 114:  
[[CS-MIPI-X for Raspberry Pi#Video Control Toolkits Manual|CS Series Video Control Toolkits Manual]]
 
[[CS-MIPI-X for Raspberry Pi#Video Control Toolkits Manual|CS Series Video Control Toolkits Manual]]
    +
=== Notes for CM4 ===
 +
Cm4 supports the use of two cameras at the same time. Following above steps will only be able to use CAM1. To use two cameras, follow the following steps:
 +
 +
==== Upgrade dt-blob.bin ====
 +
<code>wget <nowiki>https://www.raspberrypi.org/documentation/hardware/computemodule/dt-blob-dualcam.bin</nowiki></code>
 +
 +
<code>sudo cp dt-blob-dualcam.bin /boot/dt-blob.bin</code>
 +
 +
==== Upgrade dual camera version dtbo file ====
 +
Use csimx307,5.10.17-v7l+ kernel as an example:
 +
 +
<code>sudo cp raspberrypi_v4l2/release/driver_bin/5.10.17-v7l+/csimx307-dual-cm4.dtbo /boot/overlays/csimx307.dtbo</code>
 +
 +
<code>sudo reboot</code>
 +
 +
==== Device node description ====
 +
The CM4 module uses two I2C channels to communicate with the two cameras respectively.
 +
{| class="wikitable"
 +
! description
 +
!i2c bus num
 +
!video node
 +
|-
 +
|CAM0
 +
|0
 +
|video0
 +
|-
 +
|CAM1
 +
|10
 +
|video2
 +
|}
 +
Note: If there is only one camera, video node is always video0.
 +
 +
==== Gstreamer usage Demo ====
 +
<code>export DISPLAY=:0</code>
 +
 +
*CAM0 preview(VEYE-MIPI-327,CS-MIPI-IMX307 @1080p mode)
 +
 +
<code>gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,format=(string)UYVY, width=(int)1920, height=(int)1080,framerate=(fraction)30/1" ! videoconvert ! fpsdisplaysink videosink=autovideosink sync=false text-overlay=false -v</code>
 +
 +
*CAM1 preview(VEYE-MIPI-327,CS-MIPI-IMX307 @1080p mode)
 +
 +
<code>gst-launch-1.0 v4l2src device=/dev/video2 ! "video/x-raw,format=(string)UYVY, width=(int)1920, height=(int)1080,framerate=(fraction)30/1" ! videoconvert ! fpsdisplaysink videosink=autovideosink sync=false text-overlay=false -v</code>
 
=== Source code cross compilation ===
 
=== Source code cross compilation ===
 
The main resources in this section are the [https://www.raspberrypi.org/documentation/linux/kernel/building.md official piOS building method]. We use the method of cross-compilation, and the 5.4.72 version of 32bitOS is taken as an example.
 
The main resources in this section are the [https://www.raspberrypi.org/documentation/linux/kernel/building.md official piOS building method]. We use the method of cross-compilation, and the 5.4.72 version of 32bitOS is taken as an example.

Navigation menu