Skip to main content
Version: Torizon OS 6.x.y

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:

e-con Camera and adapter

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.

CSI Camera Set 5MP AR0521 Front View Connected to Toradex Board

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.

CSI Camera Set 5MP AR0521 module, cables, adapter, and carrier board

info

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).

CSI Camera Set 5MP AR0521 Connection to Ixora

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.

Camera Connection to Verdin Development Board

Verdin Development Board Connection upside view

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.

Dahlia Carrier Board Connection upside view

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.

Yavia carrier board connection upside view

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.

Mallow Carrier Board connection bottom side view

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.

  1. 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
  1. 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
  2. Build Image

    RAM Usage

    If 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
  3. 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

Long First Boot

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.



Send Feedback!