Skip to main content

PICO-IMX8M TEVS Camera Usage Guide

πŸš€ Introduction​

This article guides you how to get started using TechNexion camera modules on PICO-IMX8M Mini board.

Background knowledge needed

You must have the background knowledge to modify the kernel configuration, rebuild, and replace the kernel and the device tree source (DTS).

e.g. PICO-PI Baseboard

This article uses the PICO-PI baseboard as an example, based on the Yocto 4.2 (Mickledore) 2024Q2 Release. The corresponding Linux kernel version is 6.1.55_2.2.0.


πŸ“Έ Supported Camera Modules​

Camera SeriesProducts
TEVS
TEVS-AR0144
TEVS-AR0145
TEVS-AR0234
TEVS-AR0521
TEVS-AR0522
TEVS-AR0821
TEVS-AR0822
TEVS-AR1335

🧩 Supported Boards​

SoMBoard
PICO-IMX8M-MINIPICO-PI
PICO-WIZARD

πŸ”§ Hardware Setup Instructions​

Kindly refer to the following pages:

πŸ”— PICO-PI-IMX8M-MINI
πŸ”— PICO-WIZARD-IMX8M-MINI


πŸ’» Prepare Yocto demo image for testing TechNexion camera​

To test TechNexion cameras, you will need a Yocto-based demo image that includes the necessary device tree blobs and camera drivers.

πŸ”½ Downloading the Demo Image​

Prebuilt demo images are available for download on TechNexion's official server.

πŸ”— Demo Image for PICO-IMX8M Mini


πŸ’Ύ Flashing the Image​

You can flash the image to either e.MMC or an SD Card using one of the following methods:

1. Using uuu Tool (Universal Update Utility)​

TechNexion provides a guide to flash the image using the uuu tool: πŸ”— How to Flash with UUU

Boot Mode

Before flashing, ensure the board is set to Serial Download Mode in the boot configuration. You can refer to Hardware Setup Instructions for more details.


2. Using ums Command in U-Boot (USB Mass Storage)​

Alternatively, you can write the image directly to flash storage over USB-OTG using U-Boot’s ums command: πŸ”— Using UMS in U-Boot

U-Boot Requirement

The board must be booted with a version of U-Boot that supports the ums command. Typically, this is done from the existing e.MMC.


πŸ› οΈ Build Yocto​

TechNexion supports building a Yocto-based Linux image tailored for camera modules using the following kernel and branch.

πŸ“¦ Supported Linux Kernel​

Linux Kernel VersionYocto Branch
6.1.55tn-imx_6.1.55_2.2.0-stable

πŸ“ Source and Build Instructions​

πŸ”— Fetch Yocto Source
πŸ“– Build Yocto (Instructions for PICO-IMX8MM)


πŸ“Έ Camera Testing Instructions​

Specify Camera DTBO in U-Boot​

  1. Connect the debug console cable to the baseboard.

  2. Power on the board and interrupt the boot process. Keep pressing Enter when the following message appears: Hit any key to stop autoboot:

  3. Set the correct camera overlay (DTBO) using the U-Boot environment variable:

u-boot=> setenv dtoverlay $dtoverlay tevs
  1. Save and continue the boot process:
u-boot=> saveenv
u-boot=> boot

πŸŽ₯ Start Camera Video Stream via GStreamer​

Check Camera Availability​

Use the v4l2-ctl tool to list connected video devices.

$ v4l2-ctl --list-device

Example output:

i.MX6S_CSI (platform:32e20000.csi1_bridge):
/dev/video0

In this example, /dev/video0 is the capture device connected via CSI.


Launch GStreamer Pipeline​

Replace <res_w>, <res_h>, <x>, and <y> with your desired resolution and screen dimensions:

$ gst-launch-1.0 v4l2src device=/dev/video0 ! \
video/x-raw, width=<res_w>, height=<res_h> ! \
imxvideoconvert_g2d ! \
waylandsink window-width=<x> window-height=<y> sync=false

🚨 Troubleshooting​

Ensure camera device tree blob overlay(DTBO) is specified correctly in u-boot.

  u-boot=> printenv dtoverlay
dtoverlay=ili9881c tevs

We can check whether camera have been initialized correctly.
For TEVS cameras:

  $ dmesg| grep tevs
[ 2.886537] tevs 1-0048: tevs_probe() device node: tevs@48
[ 3.457747] tevs 1-0048: Version:24.10.0.1
[ 3.468184] tevs 1-0048: Product:TEVS-AR1335, HeaderVer:3, MIPI_Rate:800
[ 3.505338] mxc_mipi-csi 32e30000.mipi_csi: Registered sensor subdevice: tevs 1-0048
[ 3.567084] tevs 1-0048: probe success

Ensure camera device tree blob(DTB) is specified correctly.

  $ dmesg -t | grep -i model
Machine model: TechNexion PICO-IMX8MM and PI baseboard