NXP 8MPLUSLPD4-EVK board TEVS Camera Usage Guide
  • 27 Sep 2024
  • 2 Minutes to read
  • Dark
    Light
  • PDF

NXP 8MPLUSLPD4-EVK board TEVS Camera Usage Guide

  • Dark
    Light
  • PDF

Article summary

Introduction

This article guides you how to get started using TEVS Series camera on NXP 8MPLUSLPD4-EVK board.

Supported Camera Modules

Camera SeriesProducts
TEVSTEVS-AR0144-C
TEVS-AR0145-M
TEVS-AR0234-C
TEVS-AR0521-C
TEVS-AR0522-C
TEVS-AR0522-M
TEVS-AR0821-C
TEVS-AR0822-C
TEVS-AR1335-C
TEVI-OV5640 and TEVI-AR Series Cameras is no longer supported from Yocto 4.2

TEVI-OV5640 and TEVI-AR Series Cameras are only supported up to Yocto 4.0. If you want to use them, you can refer to Yocto 4.0 (Kirkstone) 2024Q1 Release.

Overview

Prepare adapter board and cable for TechNexion camera

Prepare adapter board and cable connect to EVK board:
S__47931399-1.jpg

Other easy options

After migrating to mass production stage, we suggest you to choose Technexion EDM-G-IMX8M Plus solution. It benefits for more compact size for different use cases.
WB-EDM-G-IMX8M-PLUS, (cameras support list)

Prepare Yocto demo image for testing TechNexion camera

The demo image contains the required device tree blobs and camera drivers to enable TechNexion TEVS Series cameras.
Choose the correct demo image that is compatible with the EVK board you have.
There are two kinds of DRAM types for i.mx8mp evk boards: it's equipped with DDR4 or LPDDR4.

Prebuilt demo images can be available for download via TechNexion's server.
Image Download Link

Flash image to SD card

Under Windows:
balena etcher

Under Linux:
bmap-tools

sudo apt-get update
sudo apt-get install bmap-tools

Ensure the boot mode is configured as boot from SD card.
getting-started-with-the-i-mx-8m-plus-evk:GS-iMX-8M-Plus-EVK

Please refer to Instructions for testing camera section for camera testing steps.

Build Yocto

Fetch Yocto source
Build Yocto

Develop Linux kernel

Fetch and compile Linux kernel

The Build Enviroment

Tested under ubuntu 18.04/20.04.
Using gcc-linaro-6.4.1-2017.11-x86_64_aarch64-linux-gnu toolchain.

Supported TechNexion Linux kernel branch for TEVS Series cameras

Linuxbranch
6.1.55tn-imx_6.1.55_2.2.0-next

Download the source code:

$ git clone https://github.com/TechNexion/linux-tn-imx.git
$ cd linux-tn-imx
~/linux-tn-imx$
~/linux-tn-imx$ git checkout tn-imx_6.1.55_2.2.0-next

Set cross-compile environment & the kernel config:

$ export PATH=$PATH:/opt/gcc-linaro-6.4.1-2017.11-x86_64_aarch64-linux-gnu/bin
$ export ARCH=arm64
$ export CROSS_COMPILE=/opt/gcc-linaro-6.4.1-2017.11-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
~/linux-tn-imx$ make imx_v8_defconfig

Compile the kernel & module driver:

#compile kernel
~/linux-tn-imx$ make
#compile module driver
~/linux-tn-imx$ rm -rf ../modules/*
~/linux-tn-imx$ make INSTALL_MOD_PATH=../modules modules_install

Change kernel Image, DTB & modules:

~/linux-tn-imx/$ cp arch/arm64/boot/Image  <mount_folder>/boot/Image

~/linux-tn-imx/$ cp arch/arm64/boot/dts/freescale/imx8mp-evk-tevs.dtb  <mount_folder>/boot/

~/linux-tn-imx/$ sudo cp -r ../modules/lib/modules/*  <mount_folder>/root/lib/modules/

Instructions for testing camera

Specify camera DTB in u-boot

  1. Connect debug console cable to NXP 8MPLUSLPD4-EVK.

  2. Power on board, and enter u-boot prompt.

  3. Specify camera dtb via 'fdtfile' u-boot environment variable

$ setenv fdtfile imx8mp-evk-tevs.dtb
  1. Continue boot process.
$ saveenv
$ boot

Start camera video stream via gstreamer

We can check whether camera have been link via v4l2 control command :

$ v4l2-ctl --list-device

Get the device number of camera capture device.

mxc-isi-cap (platform:32e00000.isi:cap_devic):
       /dev/video{X}

The following is example.
20230119-104440.png

Specify the capture device you just get and start gstreamer to get video stream on screen :

$ gst-launch-1.0 v4l2src device=/dev/video{X} ! video/x-raw,width=<x>,height=<y> ! waylandsink

Trouble shooting

Boot up NXP 8MPLUSLPD4-EVK and check initialization of AP1302 driver.
If it shows below messages, the driver is initialized correcly.

$ dmesg -t | grep tevs

tevs 1-0048: tevs_probe() device node: tevs@48
tevs 1-0048: Version:24.1.1.3
tevs 1-0048: Product:TEVS-AR0234, HeaderVer:3, MIPI_Rate:800
tevs 1-0048: probe success

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

$dmesg -t | grep -i model

Machine model: NXP i.MX8MPlus EVK board with TechNexion TEVS camera


Was this article helpful?