AM62P CSI

From Variscite Wiki
Revision as of 12:53, 22 April 2025 by Francesco (talk | contribs) (Created page with "<!-- Set release according to "release" parameter in URL and use am62p-yocto-scarthgap-6.6.58_10.01.10.04-v1.0 as default --> {{INIT_RELEASE_PARAM|am62p-yocto-scarthgap-6.6.58_10.01.10.04-v1.0}}<!-- --> {{#lst:Yocto_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!-- --> {{#lst:B2QT_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!-- --> {{PageHeader|{{#var:HARDWARE_NAME}} Camera}} {{DocImage|category1=Yocto|category2={{#var:HARDWARE_NAME}}}} __toc__ = Testing MIPI-CSI...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Warning: This page is designed to be used with a 'release' URL parameter.

This page is using the default release am62p-yocto-scarthgap-6.6.58_10.01.10.04-v1.0.
To view this page for a specific Variscite SoM and software release, please follow these steps:

  1. Visit variwiki.com
  2. Select your SoM
  3. Select the software release
VAR-SOM-AM62P Camera

Testing MIPI-CSI2 cameras

Camera Probe

Run the following command to see if you have the camera(s) detected

# v4l2-ctl --list-devices

This should produce the following output

j721e-csi2rx (platform:30102000.ticsi2rx):
        /dev/video2
        /dev/video3
        /dev/video4
        /dev/video5
        /dev/video6
        /dev/video7
        /dev/media0

wave5-dec (platform:30210000.video-codec):
        /dev/video0
        /dev/video1

The camera interface is /dev/video2

Testing Camera Preview on Display

The pipeline is configured individually by the user-space application.

At a minimum, the pixel format, resolution, and framerate must be configured:

# cam -c1 --stream <resolution>,pixelformat=UYVY -C1

After configuring the pipeline, it can be confirmed by reading it back:

# media-ctl --get-v4l2 '"ov5640 0-003c":0'

The following examples show how to preview the camera on the display for different resolutions:

Template:AM62P CAM PREVIEW Template:AM62P CAM PREVIEW Template:AM62P CAM PREVIEW Template:AM62P CAM PREVIEW Template:AM62P CAM PREVIEW Template:AM62P CAM PREVIEW

Testing Camera JPEG Snapshot

To capture JPEG snapshot run one of the pipelines below depending upon the required picture resolution.


  • VGA 640x480:
# cam -c1 --stream width=640,height=480,pixelformat=UYVY -C1
# yavta -c1 -n5 -Fframe.raw -s 640x480 -f UYVY /dev/video2
# ffmpeg -f rawvideo -pixel_format uyvy422 -video_size 640x480 -i frame.raw -frames:v 1 test_640x480.jpg
# rm frame.raw


  • NTSC 480p 720x480:
# cam -c1 --stream width=720,height=480,pixelformat=UYVY -C1
# yavta -c1 -n5 -Fframe.raw -s 720x480 -f UYVY /dev/video2
# ffmpeg -f rawvideo -pixel_format uyvy422 -video_size 720x480 -i frame.raw -frames:v 1 test_720x480.jpg
# rm frame.raw


  • HD 720p 1280x720:
# cam -c1 --stream width=1280,height=720,pixelformat=UYVY -C1
# yavta -c1 -n5 -Fframe.raw -s 1280x720 -f UYVY /dev/video2
# ffmpeg -f rawvideo -pixel_format uyvy422 -video_size 1280x720 -i frame.raw -frames:v 1 test_1280x720.jpg
# rm frame.raw


  • Full HD 1080p 1920x1080:
# cam -c1 --stream width=1920,height=1080,pixelformat=UYVY -C1
# yavta -c1 -n5 -Fframe.raw -s 1920x1080 -f UYVY /dev/video2
# ffmpeg -f rawvideo -pixel_format uyvy422 -video_size 1920x1080 -i frame.raw -frames:v 1 test_1920x1080.jpg
# rm frame.raw


  • QSXGA 1944p 2592x1944:
# cam -c1 --stream width=2592,height=1944,pixelformat=UYVY -C1
# yavta -c1 -n5 -Fframe.raw -s 2592x1944 -f UYVY /dev/video2
# ffmpeg -f rawvideo -pixel_format uyvy422 -video_size 2592x1944 -i frame.raw -frames:v 1 test_2592x1944.jpg
# rm frame.raw