6. CSI Camera
6.1 Introduction
- CSI (Camera Serial Interface) is a serial interface standard used for image transfer. It is developed and managed by the MIPI Alliance, an organization dedicated to mobile device interface standards. CSI is primarily used to connect image sensors with image processors or other devices such as digital signal processors (DSPs) or application processors. It provides a high-speed, low-power method for transmitting images and related control signals.
- The CSI interface is widely used in various applications, especially in mobile devices, embedded systems, and consumer electronics products. It provides a reliable and efficient connection between image sensors and image processors, enabling real-time capture and processing of high-quality images.
6.2 Hardware Connection
The Core3566 currently supports the IMX219 camera. To test the CSI camera, it is recommended to connect an HDMI or DSI display to the Core3566.
On the CM4-IO-BASE-B board, the packaging of the CSI (camera) and DSI (display) interfaces is similar. Care should be taken not to connect them incorrectly. These two CSI interfaces are located opposite the GPIO interface, while the DSI interface is located at the edge of the Power interface. Please note that if you are using a different baseboard, the specific layout may vary, so refer to the layout of your specific baseboard.
Connect the ribbon cable with the metal side facing the Core3566 core board to the camera interface.

6.3 Viewing Camera Information
Device list information output using the v4l2-ctl command:
v4l2-ctl --list-deviceslinaro@linaro-alip:~$ v4l2-ctl --list-devices
rkisp-statistics (platform: rkisp):
/dev/video7
/dev/video8
/dev/video16
/dev/video17
rkisp_mainpath (platform:rkisp-vir0):
/dev/video0
/dev/video1
/dev/video2
/dev/video3
/dev/video4
/dev/video5
/dev/video6
rkisp_mainpath (platform:rkisp-vir1):
/dev/video9
/dev/video10
/dev/video11
/dev/video12
/dev/video13
/dev/video14
/dev/video15
linaro@linaro-alip:~$- On the Rockchip (rkisp) platform, rkisp-vir0 and rkisp-vir1 are two virtual devices used for processing image and video data in the main path. These virtual devices can interact with cameras or other video input devices and provide processing and transmission functions for image and video data.
- In general, rkisp-vir0 and rkisp-vir1 can be connected to different cameras or video sources to achieve multi-channel image capture and processing. They provide interfaces for processing and transmitting image and video data for application programs or the system to call and use.
List camera-related parameters:
#CSI0
v4l2-ctl --list-formats-ext --device=/dev/video0
#CSI1
v4l2-ctl --list-formats-ext --device=/dev/video9Camera preview:
#If running on an SSH terminal, display the graphical interface on the first screen
export DISPLAY=:0.0
#CSI0
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=NV12,width=1920,height=1080, framerate=30/1 ! xvimagesink
#CSI1
gst-launch-1.0 v4l2src device=/dev/video9 ! video/x-raw,format=NV12,width=1920,height=1080, framerate=30/1 ! xvimagesinkTaking a photo:
#CSI0
sudo gst-launch-1.0 v4l2src num-buffers=1 device=/dev/video0 ! jpegenc ! filesink location=picture.jpg
#CSI1
sudo gst-launch-1.0 v4l2src num-buffers=1 device=/dev/video9 ! jpegenc ! filesink location=picture.jpg