Skip to main content

NXP IMX93LPDDR4X-EVK board TEVS Camera Usage Guide

πŸš€ Introduction​

This article guides you how to get started using TechNexion camera modules on NXP IMX93LPDDR4X-EVK board.


πŸ“Έ Supported Camera Modules​

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

πŸ”§ Hardware Setup Instructions​

Connect the Adapter Board and Camera Cable​

To set up TechNexion camera, connect the adapter board and camera cable to the MIPI CSI port on the EVK board.


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

To test TechNexion TEVS Series cameras, you need a demo image that includes the required Device Tree Blobs (DTBs) and camera drivers.

πŸ”½ Download and Select the Correct Image for Your EVK​

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

πŸ”— Supported Release List (Instructions for IMX93LPDDR4X-EVK)


πŸ’Ύ Flashing the Image​

You can flash the image to an SD Card using the following methods:

Boot Mode

Make sure your EVK board is set to boot from SD card.
Refer to the official NXP guide πŸ”— Getting Started with the i.MX93 EVK

1. For Windows Users​

Use balenaEtcher to write the image to your SD card:

πŸ”—

2. For Linux Users​

Use bmap-tools for a fast and reliable flashing process to the SD card:

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

πŸ› οΈ Build Yocto​

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

If you are using prebuilt demo image, you can skip this section. Please refer to πŸ“Έ Camera Testing Instructions section for camera testing steps.

πŸ“¦ Supported Linux Kernel​

Linux Kernel VersionYocto Branch
6.6.52tn-imx_6.6.52_2.2.0-stable

πŸ“ Source and Build Instructions​

πŸ”— Fetch Yocto source
πŸ“– Build Yocto (Instructions for IMX93LPDDR4X-EVK)


🐧 Develop Linux kernel​

Fetch and compile Linux kernel.

Build Enviroment
  • Host OS: Ubuntu 20.04
  • Toolchain: aarch64-linux-gnu-gcc 9.4.0

Install cross-compile & dependency tools.​

$ sudo apt update
$ sudo apt install -y gcc-aarch64-linux-gnu libncurses-dev libssl-dev bison flex git make

Clone the Kernel Source​

# For Kernel 6.6.52
$ git clone https://github.com/TechNexion/linux-tn-imx.git -b tn-imx_6.6.52_2.2.0-stable

Set cross-compile environment & the kernel config.​

$ export ARCH=arm64
$ export CROSS_COMPILE=/usr/bin/aarch64-linux-gnu-
$ cd linux-tn-imx
~/linux-tn-imx$ make imx_v8_defconfig

Compile the kernel & module driver.​

# compile kernel
~/linux-tn-imx$ make -j$(nproc)
# create kernel module folder
~/linux-tn-imx$ mkdir -p ./modules
# 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/imx93-11x11-evk-tevs-rpi22.dtb <mount_folder>/boot/
~/linux-tn-imx/$ sudo cp -r ./modules/lib/modules/* <mount_folder>/root/lib/modules/

πŸ“Έ Camera Testing Instructions​

Specify Camera DTBO in U-Boot​

  1. Connect the debug console cable to the baseboard (via USB-C).

  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. Specify the appropriate device tree for your camera using the fdtfile environment variable in U-Boot:

u-boot=> setenv fdtfile imx93-11x11-evk-tevs-rpi22.dtb
  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:

mxc-isi-cap (platform:4ae40000.isi:cap_devic):

/dev/video{X}

Launch GStreamer Pipeline​

Replace {X}, <res_w> and <res_h> with your capture device number and desired resolution:


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

🚨 Troubleshooting​

Boot up NXP IMX93LPDDR4X-EVK and check initialization of TEVS driver. If it shows below messages, the driver is initialized correctly.


$ dmesg -t | grep tevs

tevs 1-0048: tevs_probe() device node: tevs@48
tevs 1-0048: Version:24.9.0.1
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.MX93 11x11 EVK board with TechNexion TEVS AR camera