- 31 May 2023
- 3 Minutes to read
- Print
- DarkLight
- PDF
EDM-G TEVI Camera Usage Guide
- Updated on 31 May 2023
- 3 Minutes to read
- Print
- DarkLight
- PDF
Introduction
This article guides you how to get started using TEVI Series camera on EDM-G-IMX8M-PLUS.
You must have the background knowledge to modify the kernel configuration, rebuild, and replace the kernel and the device tree source (DTS)
Base on Yocto 4.0 (Kirkstone) 2023Q1 Release this artcle will using EDM-G-WB baseboard for example. Previous versions before 3.3 can refer to this artcle. Other list of support board as below.
Supported TEVI Camera Modules
SoM | Board | Support Module |
---|---|---|
EDM-IMX8M-MINI | EDM-G-WB (2023Q2 release) | TEVI-OV5640 TEVI-AR0144 TEVI-AR0234 TEVI-AR0521 TEVI-AR0522 TEVI-AR0821 TEVI-AR0822 TEVI-AR1335 |
EDM-IMX8M-MINI | EDM-G-WIZARD | TEVI-OV5640 TEVI-AR0144 TEVI-AR0234 TEVI-AR0521 TEVI-AR0522 TEVI-AR0821 TEVI-AR0822 TEVI-AR1335 |
EDM-IMX8M-PLUS | EDM-G-WB EDM-G-WIZARD | TEVI-OV5640 TEVI-AR0144 TEVI-AR0234 TEVI-AR0521 TEVI-AR0522 TEVI-AR0821 TEVI-AR0822 TEVI-AR1335 |
Overview
Connect debug console, power and camera to board
Prepare DC 5V/12V power cable to plug in. If using vizionlink must have DC 12V/minimum 3A power adapter by barrel jack connector.
(Note: EDM-G-WB 5V powered by USB Type C)
Prepare UART cable connect to debug console of EDM-G-WB
There are two MIPI-CSI-2 connectors we refer to CSI1 and CSI2. These are 70-pin board-to-board connectors from Hirose. Below is a picture of TEVI camera with CSI1 connector shown.
Prepare Yocto demo image for testing TechNexion camera
The demo image contains the required device tree blobs and camera drivers to enable TechNexion cameras.
Prebuilt demo images can be available for download via TechNexion's server.
Image Download Link:
Supported Release List
You can find the prebuilt Imaages page in Realease Notes, take YP4.0 2023Q2 for example :
Flash image to e.MMC or SD Card.
- Using 'uuu' to flash
UUU
Ensure the boot mode is configured as serial download mode.
Boot Mode Selection of EDM-G-WB
- Using u-boot's 'ums' Command to Write Flash Storage over USB-OTG
UMS
The board must also boot from either e.MMC with a version of U-boot that has the ums command enabled.
If you don't need develop linux kernel. Please refer to Instructions for testing camera section for camera testing steps.
Build Yocto
Supported TechNexion Linux kernel branch for TEVI camera modules
Linux | branch |
---|---|
5.15.52 | tn-imx_5.15.52_2.1.0-next |
Fetch Yocto source
Build Yocto
Instructions for testing camera
Specify camera DTBO in u-boot
If you are using TEVI AR series cameras, you can skip this section because it have auto detect camera function in u-boot.
Connect debug console cable to baseboard.
Power on board , and enter u-boot prompt mode.
(keep hit enter when the "Hit any key to stop autoboot : " is shown.)Specify camera dtb via 'dtoverlay' u-boot environment variable
u-boot=> setenv dtoverlay tevi-ap1302
or
u-boot=> setenv dtoverlay tevi-ov5640
or
u-boot=> setenv dtoverlay vizionlink-tevi-ap1302
- Continue boot process.
u-boot=> saveenv
u-boot=> 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. As example we have camera on CSI1, that we can see /dev/video0 specify the capture device.
():
/dev/v4l-subdev0
():
/dev/v4l-subdev1
mxc-isi-cap (platform:32e00000.isi:cap_devic):
/dev/video0
mxc-isi-m2m (platform:32e00000.isi:m2m_devic):
/dev/video1
Specify the capture device you just get and start gstreamer to get video stream on screen :
$ 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
It not necessary to use or using videoconvert. Because IMX8MP have ISI to convert format,
Trouble shooting
Ensure camera device tree blob overlay(DTBO) is specified correctly in u-boot.
u-boot=> printenv dtoverlay
dtoverlay=tevi-ap1302
or
dtoverlay=tevi-ov5640
We can check whether camera have been initialized correcly.
$ dmesg -t | grep ap1302
or
$ dmesg -t | grep ov5640
tevi-ap1302 1-003d: sensor_probe() device node: tevi_ap1302@3d
tevi-ap1302 1-003d: Product:TEVI-AR0521, Version:1. Lens:S84-IR FW:428 Freq:48M MIPI:816M, Version:1
mxc_mipi-csi 32e30000.mipi_csi: Registered sensor subdevice: tevi-ap1302 1-003d
tevi-ap1302 1-003d: probe success
or
ov5640_mipi 1-003c: supply DOVDD not found, using dummy regulator
ov5640_mipi 1-003c: supply DVDD not found, using dummy regulator
ov5640_mipi 1-003c: supply AVDD not found, using dummy regulator
mxc_mipi-csi 32e30000.mipi_csi: Registered sensor subdevice: ov5640_mipi 1-003c
ov5640_mipi 1-003c: Camera is found
Ensure camera device tree blob(DTB) is specified correctly.
$ dmesg -t | grep -i model
Machine model: TechNexion EDM-G-IMX8MP and WB baseboard