NVIDIA Jetson Orin Nano - Camera Sensors Support - IMX219

From RidgeRun Developer Wiki




Previous: Camera Sensors Support Index Next: Camera Sensors Support/IMX708






This wiki provides information about enabling the Raspberry Pi Camera V2.1 (IMX219) driver on the Jetson Orin Nano developer kit. The information provided was tested on:

* JetPack: 5.1.1
* Jetson Linux: 35.3.1
* One IMX219 Rapsberry Pi camera module V2.1

The Raspberry Pi Camera V2.1 camera module (IMX219) is compatible with the Jetson Orin Nano developer kit from NVIDIA. The camera module can be attached to the Orin Nano developer kit using an adapter to convert the 15-pin MIPI CSI output of the camera module to the 22-pin MIPI CSI camera input of the Orin Nano. The converter can look like the following images:

Figure 1: Adapter cable Arducam 38mm 15 to 22 pin
Figure 2: Adapter module Compute Module camera adapter

In order to enable the driver support, you need to run a Python script that comes with JetPack 5.1.1 under release L4T 35.3.1. The script can be executed with the following command:

sudo /opt/nvidia/jetson-io/jetson-io.py

Then, a menu will appear. Follow the options below in order to enable the IMX219 support for two cameras:

-> Configure Jetson 24pin CSI Connector 
-> Configure for compatible hardware 
-> Camera IMX219 Dual 
-> Save pin changes 
-> Save and reboot to reconfigure pins

After the board is rebooted, you can try to run the following command:

v4l2-ctl --set-fmt-video=width=1920,height=1080,pixelformat=RG10 --stream-mmap --stream-count=300 -d /dev/video0

This command will start streaming from camera port 0 (cam0). If you want to check the camera port 1 (cam1), change the video device to video1. After running the command you must see the next output in your terminal window:

<<<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps
<<<<<<<<<<<<<<<<<<<<< 21.19 fps

At this point you should be able to capture successfully.


Known issues

Before enabling the IMX219 support with the jetson-io.py tool, you may find out that if you connect the camera to the development board it will be recognized by the kernel and the driver loaded. You can verify this by running the dmesg command and grepping the keyword “imx219”. You will find the “bound” message for both ports (in case you have connected both cameras at the same time).

[  694.226388] imx708 9-001a: tegracam sensor driver:imx708_v2.0.6
[  694.527906] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx708 9-001a bound
[  694.529755] imx708 10-001a: tegracam sensor driver:imx708_v2.0.6
[  694.834263] tegra-camrtc-capture-vi tegra-capture-vi: subdev imx708 10-001a bound

Even though the driver is bound, if you try to check the video capabilities by running:

v4l2-ctl --all

The process will get stuck without showing you any kind of information (you can stop this command using ctrl+c). You will see the following error if you try to capture:

[  394.042165] bwmgr API not supported                                                                    
[  396.722887] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms                    
[  396.735648] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel               
[  396.745787] (NULL device *): vi_capture_control_message: NULL VI channel received                                    
[  396.753540] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0   
[  396.764228] (NULL device *): vi_capture_control_message: NULL VI channel received                                    
[  396.771968] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0    
[  396.782756] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel 

This is due to an error in the way the device tree is being configured. To fix this, you will need to run the jetson-io.py tool and enable the IMX219 camera support.



Previous: Camera Sensors Support Index Next: Camera Sensors Support/IMX708