Sony IMX397 Linux driver for Jetson

From RidgeRun Developer Wiki



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

Driver List Information
Refer to the RidgeRun Linux Camera Drivers to meet all the list of Drivers available.

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


For direct inquiries, please refer to the contact information available on our Contact page. Alternatively, you may complete and submit the form provided at the same link. We will respond to your request at our earliest opportunity.


Links to RidgeRun Resources and RidgeRun Artificial Intelligence Solutions can be found in the footer below.