This article provides information on how to start working with the CSI Camera Set 5MP AR0521 Color, which includes how to set up the hardware (wiring), install, and configure the necessary drivers for a touch demo.
All the products can be ordered online in the Toradex Webshop.
This topic provides pin connection details regarding connecting the CSI Camera Set 5MP AR0521 Color to the carrier boards.
Note: The flat ribbon cable, used to connect the carrier board and the camera adaptor is very fragile. If your camera does not work, make sure to test the cable connections on the flat cable.
Please refer to the below instructions for connecting the display to your specific carrier board.
See the picture below for the direct connection from the camera to the Ixora board. Make sure to connect the pin 1 side of the CSI camera to the respective pin 1 of the carrier board (MIPI-CSI Connector X28).
Connect the camera to the Verdin Development Board as indicated in the figure below. The MIPI-CSI Camera Interface is on connector X47. Make sure to connect the pin 1 side of the CSI camera to the respective pin 1 of the carrier board.
Connect the camera to the Dahlia Board, as indicated in the figure below. The MIPI-CSI Camera Interface is on connector X16.
Warning: Picture still to be provided.
Note: Support was added from the BSP version 5.0.0+devel-202008 onwards.
The camera works both with the Toradex BSP Layers and Reference Images for Yocto Project and Torizon. The camera device driver and device tree are integrated into the Toradex BSP Layers and the binaries are deployed to the reference images. The next sections explain how to use the camera.
Via serial terminal or ssh, access the board and enable the device-tree overlay already available at
/boot/overlay by writing the
.dtbo name to the
overlays.txt file. To write in the
overlays.txt you can use
vi and paste
apalis-imx8_ar0521_overlay.dtbo on the variable
fdt_overlays. After all, just
reboot the board so the changes can be applied.
# ls /boot/overlays apalis-imx8_ar0521_overlay.dtbo display-dpi-lt170410_overlay.dtbo apalis-imx8_atmel-mxt_overlay.dtbo display-edt5.7_overlay.dtbo apalis-imx8_hdmi_overlay.dtbo display-edt7_overlay.dtbo apalis-imx8_lvds_overlay.dtbo display-fullhd_overlay.dtbo apalis-imx8_mezzanine-can_overlay.dtbo display-lt161010_overlay.dtbo apalis-imx8_mezzanine_lvds_overlay.dtbo display-lt170410_overlay.dtbo apalis-imx8_mezzanine_ov5640_overlay.dtbo display-vga_overlay.dtbo apalis-imx8_ov5640_overlay.dtbo touch-atmel-mxt_overlay.dtbo # vi /boot/overlays.txt fdt_overlays=apalis-imx8_hdmi_overlay.dtbo apalis-imx8_ar0521_overlay.dtbo # sync # reboot
After the reboot, you can verify that the camera driver is starting correctly:
# dmesg | grep ar0521 [ 7.045228] ar0521 5-0042: Current Firmware Version - (1150CU96RKV1901110d381894XXXXXXX) [ 11.646248] mx8-img-md: Registered sensor subdevice: ar0521 5-0042 (1) [ 11.750804] mx8-img-md: created link [ar0521 5-0042] => [mxc-mipi-csi2.1]
To check which
/dev/video* is a capture device by getting driver information, you need to use the video-for-linux control (
v4l2-ctl) command from
v4l2 utils. In this case, the capture device is on
# ls /dev/video* /dev/video0 /dev/video1 /dev/video12 /dev/video13 /dev/video2 # v4l2-ctl -d0 -D Driver Info: Driver name : mxc-isi-cap Card type : mxc-isi-cap Bus info : platform:58140000.isi:cap_devic Driver version : 5.4.161 Capabilities : 0x84201000 Video Capture Multiplanar Streaming Extended Pix Format Device Capabilities Device Caps : 0x04201000 Video Capture Multiplanar Streaming Extended Pix Format Media Driver Info: Driver name : mxc-md Model : FSL Capture Media Device Serial : Bus info : Media version : 5.4.161 Hardware revision: 0x00000000 (0) Driver version : 5.4.161 Interface Info: ID : 0x03000014 Type : V4L Video Entity Info: ID : 0x00000012 (18) Name : mxc_isi.4.capture Function : V4L2 I/O Pad 0x01000013 : 0: Sink Link 0x02000021: from remote pad 0x100000e of entity 'mxc_isi.4': Data, Enabled
Note: Note that the video device can be in any of the listed video devices. So, check all of them to make sure to use the right one in the pipeline.
To enable the streaming, run a Gstreamer pipeline on the terminal:
# gst-launch-1.0 v4l2src device='/dev/video0' ! "video/x-raw, format=RGB16, framerate=30/1, width=1920, height=1080" ! fpsdisplaysink video-sink=waylandsink text-overlay=false sync=false -v