ON Semiconductor AR0820 Linux Driver: Difference between revisions

From RidgeRun Developer Wiki
m (Crodriguez moved page Omnivision AR0820 Linux Driver to ON Semiconductor AR0820 Linux Driver without leaving a redirect)
 
(19 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<seo title="IMX327 Linux Driver for NVIDIA Jetson | Sony IMX327 Linux Driver | RidgeRun" titlemode="replace" keywords="GStreamer, Linux SDK, Linux BSP,  Embedded Linux, Device Drivers, Nvidia, Xilinx, TI, NXP, Freescale, Embedded Linux driver development, Linux Software development, Embedded Linux SDK, Embedded Linux Application development, GStreamer Multimedia Framework, IMX327 Jetson Nano, IMX327, V4L2 Driver, Sony IMX327, Sony IMX327 Linux Driver, IMX327 Linux driver, Sony IMX327 Linux Driver, Sony, Sony IMX327, IMX 327."  description="Check out our comprehensive overview and features of the Sony IMX327 Linux Driver for NVIDIA Jetson!."></seo>
<seo title="ON Semiconductor AR0820 Linux Driver for NVIDIA Jetson | Onsemi AR0820 Linux Driver | RidgeRun" titlemode="replace" keywords="GStreamer, Linux SDK, Linux BSP,  Embedded Linux, Device Drivers, NVIDIA, Xilinx, TI, NXP, Freescale, Embedded Linux driver development, Linux Software development, Embedded Linux SDK, Embedded Linux Application development, GStreamer Multimedia Framework, NVIDIA, Jetson, Jetson TX1, Jetson TX2, Xavier, NVIDIA Jetson Xavier, NVIDIA Jetson Xavier NX, Jetson Xavier, Xilinx, TI, NXP, i.MX8, i.MX6, Jetson Xavier NX, Jetson Nano, NVIDIA Jetson Orin, Orin, Jetson Orin, Onsemi, ON Semiconductor, ON Semiconductor AR0820, AR0820, Onsemi AR0820 Linux Driver"  description="Check out our comprehensive overview and features of the ON Semiconductor AR0820 Linux Driver!."></seo>
 
<br>
{{Ambox
|image=[[File:underconstruction.png|50px]]
|issue='''ON Semiconductor AR0820 Linux Driver''' RidgeRun documentation is currently under development.
|fix=Please come back soon to read the completed information on Ridgerun's support for this Sensor. Please [https://www.ridgerun.com/contact <U>'''Contact'''</U>] RidgeRun OR email to [mailto:support@ridgerun.com <u>'''support@ridgerun.com'''</u>] if you have any questions.'''
}}
 


<table>
<table>
Line 267: Line 275:
</table>
</table>


== Omnivision AR0820 Features ==
== ON Semiconductor AR0820 Features ==
The AR0820AT is a 1/2−inch CMOS digital image sensor with a 3848 H x 2168 V active−pixel array. This advanced automotive sensor captures images in either linear or high dynamic range, with rolling−shutter readout.
 
AR0820AT is optimized for both low light and challenging high dynamic range scene performance, with a 2.1 µm DR−Pix BSI pixel and on−sensor 140 dB HDR capture capability. The sensor includes advanced functions such as in−pixel binning, windowing, and both video and single frame modes to provide flexible Region of Interest (ROI) or specific resolution in order to enhance performance in extreme low light conditions. The sophisticated sensor fault detection features and embedded data on AR0820AT are designed to enable camera ASIL B compliance. The device is programmable through a simple two−wire serial interface and supports MIPI output interface.


== Supported Platforms ==
== Supported Platforms ==


* NVIDIA Jetson Nano
* NVIDIA Jetson Xavier


== Features Included in the Driver ==
== Features Included in the Driver ==
Line 278: Line 289:
{| class="wikitable sortable"
{| class="wikitable sortable"
|-
|-
! Nano
! Xavier
|<!--
|<!--
-->
-->
Line 286: Line 297:
! SDK Support
! SDK Support
|-
|-
| 1920x1080@30fps  
| 3848x2168@30fps  
| 4 Lanes, RAW12, RGGB
| GMSL2, 4 Lanes, RAW12
| L4T 32.5 / Jetpack 4.5
| L4T 32.5.1 / Jetpack 4.5.1
|-
|-
|}<!--
|}<!--
Line 299: Line 310:
In order to use this driver, you have to patch and compile the kernel source using JetPack:
In order to use this driver, you have to patch and compile the kernel source using JetPack:


* Follow the instructions in [[Compiling_Jetson_TX1/TX2_source_code#Download_the_kernel_source_code | (Downloading sources)]] to get the kernel source code.
* Follow the [https://developer.ridgerun.com/wiki/index.php?title=Compiling_Jetson_Xavier_NX_source_code_L4T_32.4.3&action=edit&section=2 instructions] to get the kernel source code.


* Once you have the source code, apply the following the patches in order to add the changes required for the IMX327 camera at kernel and dtb level.
* Once you have the source code, apply the following the patches in order to add the changes required for the IMX327 camera at kernel and dtb level.


<pre>
<pre>
4.5_imx327.patch
4.5.1_ar0820.patch
</pre>
</pre>


* Follow the instructions in [[Compiling_Jetson_TX1/TX2_source_code#Build_Kernel | (Build Kernel)]] for building the kernel, and then flash the image.
* Follow the [https://developer.ridgerun.com/wiki/index.php?title=Compiling_Jetson_Xavier_NX_source_code_L4T_32.4.3&action=edit&section=2 instructions] for building the kernel, and then flash the image.


Make sure to enable IMX327 driver support:
Make sure to enable ar0820 driver support:
<pre>
<pre>
make menuconfig
make menuconfig
Line 315: Line 326:


<pre>
<pre>
-> Device Drivers                                                                                                                      
-> Device Drivers                                                                                                                                                                        
  -> Multimedia support                                                                                          
  -> Multimedia support (MEDIA_SUPPORT [=y])                                                                                                                                                           
    -> NVIDIA overlay Encoders, decoders, sensors and other helper chips  
        -> NVIDIA overlay Encoders, decoders, sensors and other helper chips                                                                                                                      
      -> <M> IMX327 camera sensor support
            -> MAX9296 Deserializer I2C IO Expander (I2C_IOEXPANDER_DESER_MAX9296 [=y])
</pre>
</pre>


And to select the runtime device tree blob by editing the <code>$JETSON_L4T/rootfs/boot/extlinux/extlinux.conf</code> to add the "FDT" line:
Recompile the code and install the image using your preferred method.
<pre>
TIMEOUT 30
DEFAULT primary
 
MENU TITLE L4T boot options
 
LABEL primary
      MENU LABEL primary kernel
      LINUX /boot/Image
      INITRD /boot/initrd
      FDT /boot/tegra210-p3448-0000-p3449-0000-a02.dtb
      APPEND ${cbootargs} quiet
</pre>


==Using the Driver==
==Using the Driver==
Line 342: Line 340:
==== Capture and Display ====
==== Capture and Display ====


* 1920x1080@30fps RGGB12
* 3840x2160@30fps  
<pre style="background:#d6e4f1">
<pre style="background:#d6e4f1">
gst-launch-1.0 nvarguscamerasrc ! 'video/x-raw(memory:NVMM), width=1920, height=1080, format=NV12, framerate=30/1' ! nvvidconv ! xvimagesink
gst-launch-1.0 nvarguscamerasrc ! perf ! 'video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)NV12, framerate=(fraction)30/1' ! nvvidconv ! queue ! xvimagesink
</pre>
</pre>
==== Video Encoding ====
<pre style="background:#d6e4f1">
CAPS="video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1"
gst-launch-1.0 nvarguscamerasrc sensor-id=0 num-buffers=500 ! "video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1" ! omxh264enc ! mpegtsmux ! filesink location=test.ts
</pre>
The sensor will capture in the 1920x1080@30fps mode and the pipeline will encode the video and save it into test.ts file.
=== Performance ===
==== ARM Load ====
Tegrastats display the following output when capturing with the sensor driver used in the Jetson Nano platform:
<pre>
RAM 1167/3963MB (lfb 522x4MB) CPU [25%@1132,16%@1132,9%@1132,12%@1132]
RAM 1168/3963MB (lfb 522x4MB) CPU [28%@921,12%@921,9%@921,13%@921]
RAM 1167/3963MB (lfb 522x4MB) CPU [23%@921,12%@921,13%@921,10%@921]
RAM 1167/3963MB (lfb 522x4MB) CPU [28%@921,8%@921,12%@921,12%@921]
RAM 1169/3963MB (lfb 522x4MB) CPU [26%@1479,9%@1479,16%@1479,9%@1479]
RAM 1167/3963MB (lfb 522x4MB) CPU [28%@921,13%@921,9%@921,16%@921]
RAM 1168/3963MB (lfb 522x4MB) CPU [23%@1036,13%@1036,14%@1036,7%@1036]
RAM 1167/3963MB (lfb 522x4MB) CPU [25%@921,12%@921,9%@921,11%@921]
RAM 1168/3963MB (lfb 522x4MB) CPU [25%@921,13%@921,16%@921,12%@921]
RAM 1169/3963MB (lfb 522x4MB) CPU [27%@921,12%@921,8%@921,13%@921]
RAM 1168/3963MB (lfb 522x4MB) CPU [24%@921,8%@921,13%@921,10%@921]
RAM 1169/3963MB (lfb 522x4MB) CPU [29%@921,13%@921,15%@921,6%@921]
</pre>
==== Framerate ====
Using the next pipeline we were able to measure the framerate for single capture with perf element:
<pre style="background:#d6e4f1">
gst-launch-1.0 nvarguscamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM), width=(int)1920, height=(int)1080, format=(string)NV12, framerate=(fraction)30/1' ! perf  ! fakesink
</pre>
<pre>
GST-PERF-INFO --> timestamp: 0:44:34.324884537; bps: 0,000; mean_bps: 0,000; fps: 0,000; mean_fps: 0,000
GST-PERF-INFO -->  timestamp: 0:44:35.354956530; bps: 24192,000; mean_bps: 8064,000; fps: 30,095; mean_fps: 30,095
GST-PERF-INFO -->  timestamp: 0:44:36.355520992; bps: 241920,000; mean_bps: 66528,000; fps: 29,983; mean_fps: 30,039
GST-PERF-INFO -->  timestamp: 0:44:37.356864989; bps: 241920,000; mean_bps: 101606,400; fps: 29,960; mean_fps: 30,013
GST-PERF-INFO -->  timestamp: 0:44:38.357433006; bps: 241920,000; mean_bps: 124992,000; fps: 29,983; mean_fps: 30,005
GST-PERF-INFO -->  timestamp: 0:44:39.358908010; bps: 241920,000; mean_bps: 141696,000; fps: 29,956; mean_fps: 29,995
GST-PERF-INFO -->  timestamp: 0:44:40.359357860; bps: 241920,000; mean_bps: 154224,000; fps: 29,987; mean_fps: 29,994
GST-PERF-INFO -->  timestamp: 0:44:41.360617558; bps: 241920,000; mean_bps: 163968,000; fps: 29,962; mean_fps: 29,989
GST-PERF-INFO -->  timestamp: 0:44:42.361400607; bps: 241920,000; mean_bps: 171763,200; fps: 29,977; mean_fps: 29,988
GST-PERF-INFO -->  timestamp: 0:44:43.362674329; bps: 241920,000; mean_bps: 178141,091; fps: 29,962; mean_fps: 29,985
GST-PERF-INFO -->  timestamp: 0:44:44.363320878; bps: 241920,000; mean_bps: 183456,000; fps: 29,981; mean_fps: 29,984
GST-PERF-INFO -->  timestamp: 0:44:45.364541434; bps: 241920,000; mean_bps: 187953,231; fps: 29,963; mean_fps: 29,983
GST-PERF-INFO -->  timestamp: 0:44:46.365041950; bps: 241920,000; mean_bps: 191808,000; fps: 29,985; mean_fps: 29,983
GST-PERF-INFO -->  timestamp: 0:44:47.366186373; bps: 241920,000; mean_bps: 195148,800; fps: 29,966; mean_fps: 29,981
GST-PERF-INFO -->  timestamp: 0:44:48.366852845; bps: 241920,000; mean_bps: 198072,000; fps: 29,980; mean_fps: 29,981
GST-PERF-INFO -->  timestamp: 0:44:49.368081920; bps: 241920,000; mean_bps: 200651,294; fps: 29,963; mean_fps: 29,980
GST-PERF-INFO -->  timestamp: 0:44:50.368731947; bps: 241920,000; mean_bps: 202944,000; fps: 29,981; mean_fps: 29,980
GST-PERF-INFO -->  timestamp: 0:44:51.370037391; bps: 241920,000; mean_bps: 204995,368; fps: 29,961; mean_fps: 29,979
GST-PERF-INFO -->  timestamp: 0:44:52.370821395; bps: 241920,000; mean_bps: 206841,600; fps: 29,976; mean_fps: 29,979
GST-PERF-INFO -->  timestamp: 0:44:53.371545430; bps: 241920,000; mean_bps: 208512,000; fps: 29,978; mean_fps: 29,979
GST-PERF-INFO -->  timestamp: 0:44:54.372675500; bps: 241920,000; mean_bps: 210030,545; fps: 29,966; mean_fps: 29,978
GST-PERF-INFO -->  timestamp: 0:44:55.373703465; bps: 241920,000; mean_bps: 211417,043; fps: 29,969; mean_fps: 29,978
</pre>
{{ContactUs}}
[[Category:Jetson]][[Category:Jetson V4L2 Drivers]][[Category:Sony]]

Latest revision as of 00:06, 9 July 2022




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

ON Semiconductor AR0820 Features

The AR0820AT is a 1/2−inch CMOS digital image sensor with a 3848 H x 2168 V active−pixel array. This advanced automotive sensor captures images in either linear or high dynamic range, with rolling−shutter readout.

AR0820AT is optimized for both low light and challenging high dynamic range scene performance, with a 2.1 µm DR−Pix BSI pixel and on−sensor 140 dB HDR capture capability. The sensor includes advanced functions such as in−pixel binning, windowing, and both video and single frame modes to provide flexible Region of Interest (ROI) or specific resolution in order to enhance performance in extreme low light conditions. The sophisticated sensor fault detection features and embedded data on AR0820AT are designed to enable camera ASIL B compliance. The device is programmable through a simple two−wire serial interface and supports MIPI output interface.

Supported Platforms

  • NVIDIA Jetson Xavier

Features Included in the Driver

Xavier
Feature Details SDK Support
3848x2168@30fps GMSL2, 4 Lanes, RAW12 L4T 32.5.1 / Jetpack 4.5.1

Enabling the Driver

In order to use this driver, you have to patch and compile the kernel source using JetPack:

  • Once you have the source code, apply the following the patches in order to add the changes required for the IMX327 camera at kernel and dtb level.
4.5.1_ar0820.patch
  • Follow the instructions for building the kernel, and then flash the image.

Make sure to enable ar0820 driver support:

make menuconfig
-> Device Drivers                                                                                                                                                                         
   -> Multimedia support (MEDIA_SUPPORT [=y])                                                                                                                                                            
        -> NVIDIA overlay Encoders, decoders, sensors and other helper chips                                                                                                                       
            -> MAX9296 Deserializer I2C IO Expander (I2C_IOEXPANDER_DESER_MAX9296 [=y]) 

Recompile the code and install the image using your preferred method.

Using the Driver

GStreamer Examples

Capture and Display

  • 3840x2160@30fps
gst-launch-1.0 nvarguscamerasrc ! perf ! 'video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)NV12, framerate=(fraction)30/1' ! nvvidconv ! queue ! xvimagesink