- 23 Sep 2024
- 2 Minutes to read
- Print
- DarkLight
- PDF
NXP IMX93LPDDR4X-EVK board TEVS Camera Usage Guide
- Updated on 23 Sep 2024
- 2 Minutes to read
- Print
- DarkLight
- PDF
Introduction
This article guides you how to get started using TEVS Series camera on NXP IMX93LPDDR4X-EVK board.
Supported Camera Modules
Camera Series | Products |
---|---|
TEVS | TEVS-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 |
Overview
- Prepare adapter board and cable for TechNexion camera
- Prepare Yocto demo image for testing TechNexion camera
- Build Yocto
- Develop Linux kernel
- Instructions for testing camera
- Trouble shooting
Prepare adapter board and cable for TechNexion camera
Prepare adapter board and cable connect to EVK board:
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.
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.
GS-IMX93EVK: Getting Started with the i.MX93 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
Tested under ubuntu 20.04.
Using aarch64-linux-gnu-gcc 9.4.0 cross compiler.
Supported TechNexion Linux kernel branch for TEVS Series cameras
Linux | branch |
---|---|
6.1.55 | tn-imx_6.1.55_2.2.0-next |
Install cross-compile & dependency tools.
$ sudo apt update
$ sudo apt install -y gcc-aarch64-linux-gnu libncurses-dev libssl-dev bison flex git make
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 ARCH=arm64
$ export CROSS_COMPILE=/usr/bin/aarch64-linux-gnu-
~/linux-tn-imx$ make imx_v8_defconfig
Compile the kernel & module driver.
# compile kernel
~/linux-tn-imx$ make -j$(nproc)
# 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/
Instructions for testing camera
Specify camera DTB in u-boot
Connect debug console cable to NXP IMX93LPDDR4X-EVK.
Power on board, and enter u-boot prompt.
Specify camera dtb via 'fdtfile' u-boot environment variable.
$ setenv fdtfile imx93-11x11-evk-tevs-rpi22.dtb
- 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:4ae40000.isi:cap_devic):
/dev/video{X}
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 sync=false
Trouble shooting
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