First Steps with CSI Camera Set 5MP AR0521 Color (Torizon)
Introduction
This article provides information on how to start working with the CSI Camera Set 5MP AR0521 Color.
Adding a Yocto Project layer is required. It is not possible to use TorizonCore Builder to add this driver.
The following topics will be covered:
Hardware Setup
What I need to order
The CSI Camera Set 5MP AR0521 Color can be ordered with many Toradex computers on modules and carrier boards. See the compatible products.
Where do I order
All the products can be ordered online in the Toradex Webshop.
Cable Connection
This topic provides pin connection details regarding connecting the CSI Camera Set 5MP AR0521 Color to the carrier boards.
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 instructions below for connecting the display to your specific carrier board.
Connection to Ixora
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).
Connection to Verdin Development Board
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.
Connection to Dahlia Carrier Board
Connect the camera to the Dahlia Carrier Board, as indicated in the figure below. The MIPI-CSI Camera Interface is on connector X16.
Connection to Yavia Carrier Board
Connect the camera to the Yavia carrier board, as indicated in the figure below. The MIPI-CSI Camera Interface is on connector J14.
Connection to Mallow Carrier Board
Connect the camera to the Mallow Carrier Board, as indicated in the figure below. The MIPI-CSI Camera Interface is on connector X3.
Add Yocto Project Layer
To enable the camera module, you will need to add a Yocto Project layer provided by Toradex to your Yocto Project environment.
Setup Environment
In order to get your environment setup, read and follow the steps presented in Build Torizon OS from Source With Yocto Project/OpenEmbedded. Stop following the steps prior to starting the build with
bitbake
. Once the environment is setup, you can proceed with this article.With your environment setup, you should be in the
build-torizon
directory with the following structure:..
├── build-torizon
│ ├── conf
│ │ ├── auto.conf
│ │ ├── bblayers.conf -> ../layers/meta-toradex-torizon/scripts/../conf/template/bblayers.conf
│ │ ├── checksum
│ │ ├── local.conf
│ │ └── site.conf
│ └── README.md -> ../.repo/manifests/README.md
├── layers
│ ├── manifests -> ../.repo/manifests
│ ├── meta-arm
│ ├── meta-freescale
│ ├── meta-freescale-3rdparty
│ ├── meta-freescale-distro
│ ├── meta-openembedded
│ ├── meta-security
│ ├── meta-ti
│ ├── meta-toradex-bsp-common
│ ├── meta-toradex-distro
│ ├── meta-toradex-nxp
│ ├── meta-toradex-security
│ ├── meta-toradex-ti
│ ├── meta-toradex-torizon
│ ├── meta-updater
│ ├── meta-virtualization
│ ├── meta-yocto
│ └── openembedded-core
└── setup-environment -> layers/meta-toradex-torizon/scripts/setup-environment
Add Layer
2.1. Clone the repository:
$ git clone https://github.com/toradex/meta-toradex-econ.git ../layers/meta-toradex-econ
2.2. Add the layer:
$ bitbake-layers add-layer ../layers/meta-toradex-econ/meta-ar0521
Build Image
RAM UsageIf the build system has many threads or a low amount of RAM, the build can fail due to a lack of RAM.
For information on how to build with reduced RAM usage, see Building with reduced RAM usage.
To build the Torizon OS image, run:
$ bitbake torizon-core-docker
Install the Image
After a successful build, the image will be in the
build-torizon/deploy/images/<MACHINE>
directory.The article Toradex Easy Installer provides detailed instructions on how to install images using the Toradex Easy installer.
Camera Usage
The first boot of a camera module with an older firmware installed can take up to 5 minutes. This is the time taken for the camera module to update its firmware.
If the system is reset during this period, the camera module is likely to stop working, due to a corrupted firmware.
To use the camera on Torizon, follow the steps on the How to use Cameras on Torizon page.
A good GStreamer pipeline to test this camera is the following:
## gst-launch-1.0 v4l2src device=/dev/video2 ! video/x-raw,width=1920,height=1080,framerate=65/1 ! fpsdisplaysink text-overlay=false video-sink=waylandsink sync=false -v
Please note that the device /dev/video2
can vary between different modules and configurations.