Line 4: |
Line 4: |
| The MV series and RAW series cameras are cameras designed for AI applications in the industrial field. They use the MIPI CSI-2 interface and are particularly suitable for use with embedded computing platforms. They have rich data formats and triggering features, extremely low latency, high bandwidth, and reliable stability. | | The MV series and RAW series cameras are cameras designed for AI applications in the industrial field. They use the MIPI CSI-2 interface and are particularly suitable for use with embedded computing platforms. They have rich data formats and triggering features, extremely low latency, high bandwidth, and reliable stability. |
| | | |
− | This article takes Firefly's ROC-RK3588S-PC motherboard as an example to introduce how to connect MV and RAW series cameras to the RK3588S/RK3588 system. | + | This article takes Firefly's ROC-RK3566-PC and ROC-RK3588S-PC board as an example to introduce how to connect MV and RAW series cameras to the RK3566/3K3568 and RK3588S/RK3588 system. |
| | | |
| We provide drivers for the Linux operating system (using Ubuntu as an example). | | We provide drivers for the Linux operating system (using Ubuntu as an example). |
Line 55: |
Line 55: |
| The MV series and RAW series cameras require an [[ADP-MV2 Adapter Board Data Sheet/zh|ADP-MV2]] adapter board to connect to the ROC-RK35xx-PC motherboard. | | The MV series and RAW series cameras require an [[ADP-MV2 Adapter Board Data Sheet/zh|ADP-MV2]] adapter board to connect to the ROC-RK35xx-PC motherboard. |
| | | |
− | ==== Connection of MV series camera and ADP-MV2 ==== | + | ==== Connection of new ADP-MV2 ==== |
| + | |
| + | =====Connection of MV series camera and ADP-MV2===== |
| + | The two are connected using 0.5 mm pitch*30P FFC cable with opposite-side contacts. The cable must be inserted with the silver contacts facing outside. |
| + | {| class="wikitable" |
| + | !TOP |
| + | !BOTTOM |
| + | |- |
| + | |[[File:ADP-MV2-V2 to MV-MIPI-X.jpg|alt=|center|thumb|600x600px|ADP-MV2 to MV-MIPI-X|link=http://wiki.veye.cc/index.php/File:ADP-MV2-V2_to_MV-MIPI-X.jpg]] |
| + | |[[File:ADP-MV2-V2 to MV-MIPI-X No.2.jpg|alt=|center|thumb|600x600px|ADP-MV2 to MV-MIPI-X|link=http://wiki.veye.cc/index.php/File:ADP-MV2-V2_to_MV-MIPI-X_No.2.jpg]] |
| + | |} |
| + | |
| + | ===== Connection of RAW-MIPI-SC132M and ADP-MV2 ===== |
| + | The two are connected using 1.0 mm pitch*15P FFC cable with opposite-side contacts. The cable must be inserted with the silver contacts facing outside. |
| + | {| class="wikitable" |
| + | ! TOP |
| + | !BOTTOM |
| + | |- |
| + | |[[File:ADP-MV2 to RAW-MIPI-SC132M.jpg|alt=|center|thumb|600x600px|ADP-MV2 to RAW-MIPI-SC132M|link=http://wiki.veye.cc/index.php/File:ADP-MV2_to_RAW-MIPI-SC132M.jpg]] |
| + | |[[File:ADP-MV2 to RAW-MIPI-SC132M No.2.jpg|alt=ADP-MV2 to RAW-MIPI-SC132M|center|thumb|600x600px|ADP-MV2 to RAW-MIPI-SC132M|link=http://wiki.veye.cc/index.php/File:ADP-MV2_to_RAW-MIPI-SC132M_No.2.jpg]] |
| + | |} |
| + | ===== Connection of other RAW series camera and ADP-MV2 ===== |
| + | The two are connected using 0.5 mm pitch*pin FFC cable with opposite-side contacts. The cable must be inserted with the silver contacts facing outside. |
| + | {| class="wikitable" |
| + | !TOP |
| + | !BOTTOM |
| + | |- |
| + | |[[File:ADP-MV2 to RAW series camera.jpg|alt=|center|thumb|600x600px|ADP-MV2 to RAW series camera|link=http://wiki.veye.cc/index.php/File:ADP-MV2_to_RAW_series_camera.jpg]] |
| + | |[[File:ADP-MV2 to RAW series camera No.2.jpg|alt=ADP-MV2 to RAW series camera No.2|center|thumb|600x600px|ADP-MV2 to RAW series camera|link=http://wiki.veye.cc/index.php/File:ADP-MV2_to_RAW_series_camera_No.2.jpg]] |
| + | |} |
| + | =====Connection with Main board using ADP-MV2===== |
| + | The two are connected using 0.5mm pitch * 30P FFC coaxial wires, paying attention to the direction of the contact surfaces, silver contacts facing outside on the ADP-MV2 and facing inside on the RK board. |
| + | <br />[[File:RK-ADP-MV2-V2-RAW-MIPI 02.jpg|alt=|center|thumb|800x800px|RK to ADP-MV2 and MV cam|link=http://wiki.veye.cc/index.php/File:RK-ADP-MV2-V2-RAW-MIPI_02.jpg]] |
| + | |
| + | ==== Connection of old ADP-MV2 ==== |
| + | |
| + | ===== Connection of MV series camera and ADP-MV2 ===== |
| The two are connected using 0.5 mm pitch*30P FFC cable with opposite-side contacts. The cable must be inserted with the silver contacts facing outside. | | The two are connected using 0.5 mm pitch*30P FFC cable with opposite-side contacts. The cable must be inserted with the silver contacts facing outside. |
| {| class="wikitable" | | {| class="wikitable" |
Line 65: |
Line 101: |
| |} | | |} |
| | | |
− | ==== Connection of RAW-MIPI-SC132M and ADP-MV2 ==== | + | ===== Connection of RAW-MIPI-SC132M and ADP-MV2 ===== |
| The two are connected using 1.0 mm pitch*15P FFC cable with opposite-side contacts. The cable must be inserted with the silver contacts facing outside. | | The two are connected using 1.0 mm pitch*15P FFC cable with opposite-side contacts. The cable must be inserted with the silver contacts facing outside. |
| {| class="wikitable" | | {| class="wikitable" |
Line 75: |
Line 111: |
| |} | | |} |
| | | |
− | ==== Connection of other RAW series camera and ADP-MV2 ==== | + | ===== Connection of other RAW series camera and ADP-MV2 ===== |
− | The two are connected using 15 to 22pin FFC cable with same-side contacts. The cable must be inserted with the silver contacts facing outside. | + | The two are connected using 15 to 22pin FFC cable with same-side contacts. The cable must be inserted with the silver contacts facing outside.<br /> |
− | <br /> | |
| [[File:RAW-MIPI-AR0234-ADP-MV2.jpg|link=http://wiki.veye.cc/index.php/File:RAW-MIPI-AR0234-ADP-MV2.jpg|center|thumb|800x800px|ADP-MV2 to RAW series camera]] | | [[File:RAW-MIPI-AR0234-ADP-MV2.jpg|link=http://wiki.veye.cc/index.php/File:RAW-MIPI-AR0234-ADP-MV2.jpg|center|thumb|800x800px|ADP-MV2 to RAW series camera]] |
| | | |
− | ==== Connection with Main board using ADP-MV2 ==== | + | ===== Connection with Main board using ADP-MV2 ===== |
| [[File:RK-ADP-MV2-MV-MIPI 01.jpg|center|thumb|800x800px|RK to ADP-MV2 and MV cam|link=http://wiki.veye.cc/index.php/File:RK-ADP-MV2-MV-MIPI_01.jpg]] | | [[File:RK-ADP-MV2-MV-MIPI 01.jpg|center|thumb|800x800px|RK to ADP-MV2 and MV cam|link=http://wiki.veye.cc/index.php/File:RK-ADP-MV2-MV-MIPI_01.jpg]] |
| | | |
Line 98: |
Line 133: |
| | | |
| === Upgrade Firefly Ubuntu system === | | === Upgrade Firefly Ubuntu system === |
− | For the ROC-RK3588S-PC, we have provided an image of the release system. | + | For the ROC-RK3566-PC and ROC-RK3588S-PC, we have provided an image of the release system. |
| | | |
− | Download the latest rk358x_firefly_ubuntu.tar.gz from https://github.com/veyeimaging/rk35xx_firefly/releases/ . | + | Download the latest Ubuntu imge from https://github.com/veyeimaging/rk35xx_firefly/releases/ . |
| | | |
− | Refer to the [https://wiki.t-firefly.com/en/ROC-RK3588S-PC/upgrade_bootmode.html Firefly documentation] to burn in a standard system. | + | Refer to the Firefly documentation [https://wiki.t-firefly.com/en/ROC-RK3588S-PC/upgrade_bootmode.html ROC-RK3588S-PC] [https://wiki.t-firefly.com/en/ROC-RK3566-PC/03-upgrade_firmware.html ROC-RK3566-PC]to burn in a standard system. |
| ===Check system status=== | | ===Check system status=== |
| | | |
Line 119: |
Line 154: |
| | | |
| <code>mvcam 7-003b: firmware version: 0x1290133</code> | | <code>mvcam 7-003b: firmware version: 0x1290133</code> |
| + | |
| + | On the ROC-RK3588S-PC, the camera is mounted on i2c-7, with an i2c address of 0x3b. |
| + | |
| + | On the ROC-RK3566-PC, the camera is mounted on i2c-4. |
| | | |
| * Check the video0 device node: | | * Check the video0 device node: |
Line 157: |
Line 196: |
| You can see that: | | You can see that: |
| | | |
− | * The complete name of this entity is: <code>m00_b_mvcam 7-003b</code>. | + | * The complete name of this entity is: <code>m00_b_mvcam 7-003b</code>.(It is <code>m00_b_mvcam 4-003b</code>on ROC-RK3566-PC.) |
| * It is a V4L2 subdev (Sub-Device) Sensor. | | * It is a V4L2 subdev (Sub-Device) Sensor. |
| * Its corresponding node is <code>/dev/v4l-subdev2</code>, which can be opened and configured by applications (such as <code>v4l2-ctl</code>). | | * Its corresponding node is <code>/dev/v4l-subdev2</code>, which can be opened and configured by applications (such as <code>v4l2-ctl</code>). |
Line 234: |
Line 273: |
| | | |
| ====Configuring global variables==== | | ====Configuring global variables==== |
| + | Based on the board model, configure the I2C_BUS global variable as follows: |
| + | |
| + | * ROC-RK3588S-PC |
| + | |
| + | <code>export I2C_BUS=7</code> |
| + | |
| + | * ROC-RK3566-PC |
| + | |
| + | <code>export I2C_BUS=4</code> |
| + | |
| For the convenience of later descriptions, global variables are configured here according to the sensor size. | | For the convenience of later descriptions, global variables are configured here according to the sensor size. |
| | | |
Line 286: |
Line 335: |
| *RAW-MIPI-SC132M | | *RAW-MIPI-SC132M |
| | | |
− | <code>export WIDTH=1080</code> | + | <code>export WIDTH=1024</code> |
| | | |
| <code>export HEIGHT=1280</code> | | <code>export HEIGHT=1280</code> |
Line 368: |
Line 417: |
| use the following command to configure the camera's data format, resolution, and frame rate using <code>media-ctl</code>: | | use the following command to configure the camera's data format, resolution, and frame rate using <code>media-ctl</code>: |
| | | |
− | <code>media-ctl -d /dev/media0 --set-v4l2 '"m00_b_mvcam 7-003b":0[fmt:Y8_1X8/'"$WIDTH"'x'"$HEIGHT"'@1/'"$FPS"']'</code> | + | <code>media-ctl -d /dev/media0 --set-v4l2 '"m00_b_mvcam '"$I2C_BUS"'-003b":0[fmt:Y8_1X8/'"$WIDTH"'x'"$HEIGHT"'@1/'"$FPS"']'</code> |
| | | |
− | Among them: <code>"m00_b_mvcam 7-003b"</code> refers to the complete name of the camera entity, <code>Y8_1X8</code> is the mbus-code, <code>'"$WIDTH"'x'"$HEIGHT"'</code> indicates the resolution, <code>1/'"$FPS"'</code> indicates the resolution frame rate. | + | Among them: <code>"m00_b_mvcam '"$I2C_BUS"'-003b"</code> refers to the complete name of the camera entity, <code>Y8_1X8</code> is the mbus-code, <code>'"$WIDTH"'x'"$HEIGHT"'</code> indicates the resolution, <code>1/'"$FPS"'</code> indicates the resolution frame rate. |
| | | |
| The width and height here cooperate with the roi_x and roi_y of the v4l2-ctl command to form the ROI parameter. | | The width and height here cooperate with the roi_x and roi_y of the v4l2-ctl command to form the ROI parameter. |
Line 387: |
Line 436: |
| <code>v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl roi_y=0</code> | | <code>v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl roi_y=0</code> |
| | | |
− | <code>media-ctl -d /dev/media0 --set-v4l2 '"m00_b_mvcam 7-003b":0[fmt:Y8_1X8/'"$WIDTH"'x'"$HEIGHT"'@1/'"$FPS"']'</code> | + | <code>media-ctl -d /dev/media0 --set-v4l2 '"m00_b_mvcam '"$I2C_BUS"'-003b":0[fmt:Y8_1X8/'"$WIDTH"'x'"$HEIGHT"'@1/'"$FPS"']'</code> |
| =====Frame rate statistics===== | | =====Frame rate statistics===== |
| In streaming mode, the following commands can be used for frame rate statistics: | | In streaming mode, the following commands can be used for frame rate statistics: |
Line 393: |
Line 442: |
| <code>v4l2-ctl --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat=GREY --stream-mmap --stream-count=-1 --stream-to=/dev/null</code> | | <code>v4l2-ctl --set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat=GREY --stream-mmap --stream-count=-1 --stream-to=/dev/null</code> |
| | | |
| + | Or: |
| + | |
| + | <code>./yavta -c1000 --skip 0 -f Y8 -s ${WIDTH}x${HEIGHT} /dev/video0</code> |
| ===== Save image to file ===== | | ===== Save image to file ===== |
| | | |
Line 426: |
Line 478: |
| See the [https://github.com/veyeimaging/rk356x_firefly/tree/main/linux/samples samples] directory on github for details. | | See the [https://github.com/veyeimaging/rk356x_firefly/tree/main/linux/samples samples] directory on github for details. |
| | | |
− | <code>python ./v4l2dev_2_opencv_show_grey.py --width 1456 --height 1088 --fps 60</code> | + | <code>python ./v4l2dev_2_opencv_show_grey.py --width 1456 --height 1088 --fps 60 --i2c 7</code> |
| | | |
| ===== Example of gstreamer application ===== | | ===== Example of gstreamer application ===== |
Line 444: |
Line 496: |
| <code>v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl roi_y=0</code> | | <code>v4l2-ctl -d /dev/v4l-subdev2 --set-ctrl roi_y=0</code> |
| | | |
− | <code>media-ctl -d /dev/media0 --set-v4l2 '"m00_b_mvcam 7-003b":0[fmt:Y8_1X8/'"$WIDTH"'x'"$HEIGHT"'@1/'"$FPS"']'</code> | + | <code>media-ctl -d /dev/media0 --set-v4l2 '"m00_b_mvcam '"$I2C_BUS"'-003b":0[fmt:Y8_1X8/'"$WIDTH"'x'"$HEIGHT"'@1/'"$FPS"']'</code> |
| =====Software trigger mode===== | | =====Software trigger mode===== |
| ======Set mode====== | | ======Set mode====== |
Line 485: |
Line 537: |
| | | |
| ===References=== | | ===References=== |
| + | |
| + | *ROC-RK3566-PC Manual |
| + | |
| + | https://wiki.t-firefly.com/en/ROC-RK3566-PC/ |
| | | |
| *ROC-RK3588S-PC Manual | | *ROC-RK3588S-PC Manual |
Line 494: |
Line 550: |
| https://wiki.t-firefly.com/en/Firefly-Linux-Guide/index.html | | https://wiki.t-firefly.com/en/Firefly-Linux-Guide/index.html |
| ===Document History=== | | ===Document History=== |
| + | |
| + | * 2024-04-17 |
| + | |
| + | Support RK3566. |
| + | |
| + | * 2024-03-10 |
| + | |
| + | Add pictures and descriptions of hardware connections for the new version of ADP-MV2. |
| | | |
| *2023-08-30 | | *2023-08-30 |