Sony IMX397 Linux driver for Jetson

From RidgeRun Developer Connection
Jump to: navigation, search

Nvidia-preferred-partner-badge-rgb-for-screen.png

Error something wrong.jpg Problems running the pipelines shown on this page?
Please see our GStreamer Debugging guide for help.

RR Contact Us.png


Sony IMX397 Sensor features

Reference: Sony IMX397 sensor

The Sony IMX397 is a Small, Low Power Global Shutter CMOS Imager for High-speed Monitoring and Sensing in Embedded Industrial Applications.

  • Tested resolutions are 640x480 at 200fps. The tested format is GREY.
  • The IMX397 driver supports 1 lane configuration for the given resolution.

Build kernel using Jetpack and imx397 driver

Jetson Nano

Building kernel sources

Follow the instructions in NVIDIA_Jetson_Nano - Building the Kernel from Source to build the kernel sources for the Jetson Nano.

Enable driver

Once you are following the guide there is a step make menuconfig, which allows you to enable the imx397 driver as built-in.

make ARCH=arm64 O=$KERNEL_OUT menuconfig

Select the driver. The menu option is located:

-> Device Drivers
  -> Multimedia support (MEDIA_SUPPORT [=y])
    -> NVIDIA overlay Encoders, decoders, sensors, and other helper chips
       <*> IMX397 camera sensor support

Test your Kernel image using Jetpack root file system

Check the kernel version. At this moment you can test the image created in order to see if the new kernel is working correctly. You have to see a new kernel version with the correct date of compilation:

Jetson Nano

uname -a 
Linux nvidia 4.9.140 #6 SMP PREEMPT Tue May 7 16:25:38 CST 2019 aarch64 aarch64 aarch64 GNU/Linux

Nano EVM kit

You can see that the driver is probed, execute the line: dmesg | grep "imx397"

Expected output:

nvidia@nvidia:~$ dmesg | grep "imx397"
[    1.667200] imx397 6-001a: Driver Version: 0.1.0

video devices created:

ls /dev/video*
/dev/video0

Examples

GStreamer Nano

480p@200fps

gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=5 ! "video/x-raw,width=640,height=480,framerate=(fraction)200/1,format=GRAY8" ! \
filesink location=test.raw
gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,width=640,height=480,framerate=(fraction)200/1,format=GRAY8" ! \
nvvidconv ! 'video/x-raw(memory:NVMM),format=I420,width=640,height=480' ! nvoverlaysink
gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw,width=640,height=480,framerate=(fraction)200/1,format=GRAY8" ! \
nvvidconv ! omxh264enc ! mpegtsmux ! filesink location=test.ts


RidgeRun Resources

Quick Start Client Engagement Process RidgeRun Blog Homepage
Technical and Sales Support RidgeRun Online Store RidgeRun Videos Contact Us

OOjs UI icon message-progressive.svg Contact Us

Visit our Main Website for the RidgeRun Products and Online Store. RidgeRun Engineering informations are available in RidgeRun Professional Services, RidgeRun Subscription Model and Client Engagement Process wiki pages. Please email to support@ridgerun.com for technical questions and contactus@ridgerun.com for other queries. Contact details for sponsoring the RidgeRun GStreamer projects are available in Sponsor Projects page. Ridgerun-logo.svg
RR Contact Us.png