Difference between revisions of "ON Semiconductor AR0231 Linux driver"

From RidgeRun Developer Connection
Jump to: navigation, search
m
m
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
<seo title="ON Semiconductor Linux Drivers | Linux Driver for Jetson TX2 | RidgeRun Developer" 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,AR0231 Jetson TX2,RidgeRun, V4L2 Driver, Sekonix, ON Semiconductor, ON Semiconductor AR0231, OnSemi AR0231,sekolab"  description="Check out our comprehensive overview of the ON Semiconductor AR0231 Linux driver for Jetson TX2.Check out the features and more at RidgeRun!"></seo>
+
<seo title="ON Semiconductor AR0231 Linux driver for NVIDIA Jetson | AR0231 Linux Driver for Jetson TX2 | RidgeRun" titlemode="replace" metakeywords="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, AR0231 Jetson TX2, RidgeRun, V4L2 Driver, Sekonix, ON Semiconductor, ON Semiconductor AR0231, OnSemi AR0231, sekolab, OnSemi, Jetson, NVIDIA Jetson, RidgeRunmetadescription="Please read a comprehensive overview of the ON Semiconductor AR0231 Linux driver for Jetson TX2, features and more at RidgeRun!"></seo>
  
<table cellspacing="5">
+
<table>
 
<tr>
 
<tr>
 
<td><div class="clear; float:right">__TOC__</div></td>
 
<td><div class="clear; float:right">__TOC__</div></td>
<td valign=top>
+
<td>
<html>
+
{{Shopping cart mpo for V4L2 camera drivers}}
<div id='product-component-f3c99acb69d'></div>
+
<td>
    <script type="text/javascript">
+
{{NVIDIA Preferred Partner logo}}
    /*<![CDATA[*/
+
<td>
 
 
    (function () {
 
      var scriptURL = 'https://sdks.shopifycdn.com/buy-button/latest/buy-button-storefront.min.js';
 
      if (window.ShopifyBuy) {
 
        if (window.ShopifyBuy.UI) {
 
          ShopifyBuyInit();
 
        } else {
 
          loadScript();
 
        }
 
      } else {
 
        loadScript();
 
      }
 
 
 
      function loadScript() {
 
        var script = document.createElement('script');
 
        script.async = true;
 
        script.src = scriptURL;
 
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(script);
 
        script.onload = ShopifyBuyInit;
 
      }
 
 
 
      function ShopifyBuyInit() {
 
        var client = ShopifyBuy.buildClient({
 
          domain: 'ridgerun1.myshopify.com',
 
          storefrontAccessToken: 'b0ca98633a82de5d2f63cd51f5af30ac',
 
        });
 
 
 
        ShopifyBuy.UI.onReady(client).then(function (ui) {
 
          ui.createComponent('product', {
 
            id: [1820862742599],
 
            node: document.getElementById('product-component-f3c99acb69d'),
 
            moneyFormat: '%24%7B%7Bamount%7D%7D',
 
            options: {
 
  "product": {
 
    "buttonDestination": "checkout",
 
    "variantId": "all",
 
    "width": "240px",
 
    "contents": {
 
      "imgWithCarousel": false,
 
      "variantTitle": false,
 
      "description": false,
 
      "buttonWithQuantity": false,
 
      "quantity": false
 
    },
 
    "text": {
 
      "button": "Purchase Now"
 
    },
 
    "styles": {
 
      "product": {
 
        "@media (min-width: 601px)": {
 
          "max-width": "100%",
 
          "margin-left": "0",
 
          "margin-bottom": "50px"
 
        }
 
      },
 
      "button": {
 
        "background-color": "#0196ba",
 
        "font-family": "Open Sans, sans-serif",
 
        "font-size": "18px",
 
        "padding-top": "17px",
 
        "padding-bottom": "17px",
 
        "padding-left": "50px",
 
        "padding-right": "50px",
 
        ":hover": {
 
          "background-color": "#0187a7"
 
        },
 
        "border-radius": "5px",
 
        ":focus": {
 
          "background-color": "#0187a7"
 
        },
 
        "font-weight": "bold"
 
      },
 
      "quantityInput": {
 
        "font-size": "18px",
 
        "padding-top": "17px",
 
        "padding-bottom": "17px"
 
      },
 
      "compareAt": {
 
        "font-size": "12px"
 
      }
 
    },
 
    "googleFonts": [
 
      "Open Sans"
 
    ]
 
  },
 
  "cart": {
 
    "contents": {
 
      "button": true
 
    },
 
    "styles": {
 
      "button": {
 
        "background-color": "#0196ba",
 
        "font-family": "Open Sans, sans-serif",
 
        "font-size": "18px",
 
        "padding-top": "17px",
 
        "padding-bottom": "17px",
 
        ":hover": {
 
          "background-color": "#0187a7"
 
        },
 
        "border-radius": "5px",
 
        ":focus": {
 
          "background-color": "#0187a7"
 
        },
 
        "font-weight": "bold"
 
      },
 
      "footer": {
 
        "background-color": "#ffffff"
 
      }
 
    },
 
    "googleFonts": [
 
      "Open Sans"
 
    ]
 
  },
 
  "modalProduct": {
 
    "contents": {
 
      "img": false,
 
      "imgWithCarousel": true,
 
      "variantTitle": false,
 
      "buttonWithQuantity": true,
 
      "button": false,
 
      "quantity": false
 
    },
 
    "styles": {
 
      "product": {
 
        "@media (min-width: 601px)": {
 
          "max-width": "100%",
 
          "margin-left": "0px",
 
          "margin-bottom": "0px"
 
        }
 
      },
 
      "button": {
 
        "background-color": "#0196ba",
 
        "font-family": "Open Sans, sans-serif",
 
        "font-size": "18px",
 
        "padding-top": "17px",
 
        "padding-bottom": "17px",
 
        "padding-left": "50px",
 
        "padding-right": "50px",
 
        ":hover": {
 
          "background-color": "#0187a7"
 
        },
 
        "border-radius": "5px",
 
        ":focus": {
 
          "background-color": "#0187a7"
 
        },
 
        "font-weight": "bold"
 
      },
 
      "quantityInput": {
 
        "font-size": "18px",
 
        "padding-top": "17px",
 
        "padding-bottom": "17px"
 
      }
 
    },
 
    "googleFonts": [
 
      "Open Sans"
 
    ]
 
  },
 
  "toggle": {
 
    "styles": {
 
      "toggle": {
 
        "font-family": "Open Sans, sans-serif",
 
        "background-color": "#0196ba",
 
        ":hover": {
 
          "background-color": "#0187a7"
 
        },
 
        ":focus": {
 
          "background-color": "#0187a7"
 
        },
 
        "font-weight": "bold"
 
      },
 
      "count": {
 
        "font-size": "18px"
 
      }
 
    },
 
    "googleFonts": [
 
      "Open Sans"
 
    ]
 
  },
 
  "productSet": {
 
    "styles": {
 
      "products": {
 
        "@media (min-width: 601px)": {
 
          "margin-left": "-20px"
 
        }
 
      }
 
    }
 
  }
 
}
 
          });
 
        });
 
      }
 
    })();
 
    /*]]>*/
 
    </script>
 
</html>
 
</td>
 
 
<td>
 
<td>
 
{{GStreamer debug}}
 
{{GStreamer debug}}
Line 211: Line 15:
 
{{ContactUs Button}}
 
{{ContactUs Button}}
 
</center>
 
</center>
</td>
 
 
</tr>
 
</tr>
 
</table>
 
</table>
 +
<br>
  
 
==ON Semiconductor AR0231 image sensor features==
 
==ON Semiconductor AR0231 image sensor features==
Line 265: Line 69:
 
-> Device Drivers                                                                                                                         
 
-> Device Drivers                                                                                                                         
 
   -> Multimedia support                                                                                           
 
   -> Multimedia support                                                                                           
     -> Encoders, decoders, sensors and other helper chips
+
     -> Encoders, decoders, sensors, and other helper chips
 
       -> <*> ar0231 camera sensor support
 
       -> <*> ar0231 camera sensor support
 
</pre>
 
</pre>
Line 345: Line 149:
 
</pre>
 
</pre>
  
The results show the framerate constant at just below 30FPS that use nvcamerasrc and passing frames through the ISP to convert from bayer to yuv.
+
The results show the framerate constant at just below 30FPS that use nvcamerasrc and passing frames through the ISP to convert from Bayer to YUV.
  
 
==== Latency ====
 
==== Latency ====
  
The glass to glass latency measured is described in [[Jetson_glass_to_glass_latency]] is about ~88 ms with nvcamerasrc.
+
The glass to glass latency measured as described in [[Jetson_glass_to_glass_latency]] is about ~88 ms with nvcamerasrc.
  
 
<pre>
 
<pre>
Line 361: Line 165:
 
{{ContactUs}}
 
{{ContactUs}}
  
[[Category:Jetson]][[Category:Jetson V4L2 Drivers]]
+
[[Category:Jetson]][[Category:Jetson V4L2 Drivers]][[Category:ON Semiconductor]]

Latest revision as of 05:27, 20 February 2023

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


ON Semiconductor AR0231 image sensor features

The ON Semiconductor AR0231 is an image sensor with the following features:

  • Key Technologies:
    • Automotive Grade Backside Illuminated Pixel
    • LED Flicker Mitigation Mode
    • Sensor Fault Detection for ASIL−B Compliance
    • Up to 4−exposure HDR at 1928 × 1208 and 30 fps or 3−exposure HDR at 1928 × 1208 and 40 fps
  • Latest 3.0 mm Back Side Illuminated (BSI) Pixel with ON Semiconductor DR−Pixt Technology
  • Data Interfaces: up to 4−lane MIPI CSI−2, Parallel, or up to 4−lane High Speed Pixel Interface (HiSPi) Serial Interface (SLVS and HiVCM)
  • Advanced HDR with Flexible Exposure
  • Ratio Control
  • LED Flicker Mitigation (LFM) Mode
  • Selectable Automatic or User Controlled Black Level Control
  • Frame to Frame Switching among up to 4 Contexts to Enable Multi−function Systems
  • Spread−spectrum Input Clock Support
  • Multi−Camera Synchronization Support
  • Multiple CFA Options

RidgeRun has developed a driver for the Jetson TX2 platform with the following support:

  • L4T 28.2.1 and Jetpack 3.3
  • V4l2 Media controller driver
  • Tested resolution 1928 x 1208 @ 30 fps
  • Capture with nvcamerasrc using the ISP.
  • Tested with the Sekonix SF3326 and SF3325

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 three patches in order to add the changes required for the AR0231 camera at kernel and dtb level.
3.3_ar0231.patch

Make sure to enable AR0231 driver support:

make menuconfig
-> Device Drivers                                                                                                                        
  -> Multimedia support                                                                                           
    -> Encoders, decoders, sensors, and other helper chips
       -> <*> ar0231 camera sensor support

Using the driver

GStreamer examples

Capture

gst-launch-1.0 nvcamerasrc  !  "video/x-raw(memory:NVMM),width=(int)1928,height=(int)1208,format=(string)I420,framerate=(fraction)30/1" ! autovideosink

The sensor will capture in the 3840x2160@30 mode

Setting pipeline to PAUSED ...

Available Sensor modes : 
1928 x 1208 FR=30.000000 CF=0x1209208a10 SensorModeType=4 CSIPixelBitDepth=12 DynPixelBitDepth=12
Pipeline is live and does not need PREROLL ...

NvCameraSrc: Trying To Set Default Camera Resolution. Selected sensorModeIndex = 0 WxH = 1928x1208 FrameRate = 30.000000 ...

Setting pipeline to PLAYING ...
New clock: GstSystemClock

Video Encoding

CAPS="video/x-raw(memory:NVMM), width=(int)1928, height=(int)1208, format=(string)I420, framerate=(fraction)30/1"

gst-launch-1.0 nvcamerasrc sensor-id=0 num-buffers=500 ! $CAPS ! omxh264enc ! mpegtsmux ! filesink location=test.ts

The sensor will capture in the 1928x1208@30 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:

RAM 1717/7855MB (lfb 1310x4MB) CPU [2%@2035,off,off,2%@2035,7%@2035,4%@2035] BCPU@46C MCPU@46C GPU@44C PLL@46C Tboard@41C Tdiode@44.5C PMIC@100C thermal@45.2C VDD_IN 3198/3217 VDD_CPU 456/456 VDD_GPU 228/228 VDD_SOC 762/761 VDD_WIFI 38/38 VDD_DDR 806/806
RAM 1717/7855MB (lfb 1310x4MB) CPU [4%@2035,off,off,2%@2035,3%@2035,3%@2035] BCPU@46C MCPU@46C GPU@44C PLL@46C Tboard@41C Tdiode@44.5C PMIC@100C thermal@45.4C VDD_IN 3236/3223 VDD_CPU 456/456 VDD_GPU 228/228 VDD_SOC 686/736 VDD_WIFI 38/38 VDD_DDR 806/806
RAM 1717/7855MB (lfb 1310x4MB) CPU [4%@2035,off,off,1%@2035,5%@2035,5%@2035] BCPU@46C MCPU@46C GPU@44C PLL@46C Tboard@41C Tdiode@44.5C PMIC@100C thermal@45.2C VDD_IN 3236/3226 VDD_CPU 456/456 VDD_GPU 228/228 VDD_SOC 762/742 VDD_WIFI 38/38 VDD_DDR 806/806
RAM 1717/7855MB (lfb 1310x4MB) CPU [6%@2035,off,off,1%@2035,3%@2035,2%@2035] BCPU@46C MCPU@46C GPU@44C PLL@46C Tboard@41C Tdiode@44.5C PMIC@100C thermal@45.2C VDD_IN 3198/3220 VDD_CPU 456/456 VDD_GPU 228/228 VDD_SOC 762/746 VDD_WIFI 38/38 VDD_DDR 806/806
RAM 1717/7855MB (lfb 1310x4MB) CPU [5%@2035,off,off,1%@2035,3%@2035,3%@2035] BCPU@46C MCPU@46C GPU@44C PLL@46C Tboard@41C Tdiode@44.5C PMIC@100C thermal@45.2C VDD_IN 3236/3223 VDD_CPU 456/456 VDD_GPU 228/228 VDD_SOC 762/749 VDD_WIFI 38/38 VDD_DDR 806/806
RAM 1717/7855MB (lfb 1310x4MB) CPU [5%@2035,off,off,1%@2035,2%@2035,2%@2035] BCPU@46C MCPU@46C GPU@44.5C PLL@46C Tboard@41C Tdiode@44.5C PMIC@100C thermal@45.2C VDD_IN 3198/3219 VDD_CPU 456/456 VDD_GPU 228/228 VDD_SOC 762/751 VDD_WIFI 38/38 VDD_DDR 806/806
RAM 1717/7855MB (lfb 1310x4MB) CPU [5%@2035,off,off,1%@2035,4%@2035,2%@2035] BCPU@46C MCPU@46C GPU@44C PLL@46C Tboard@41C Tdiode@44.5C PMIC@100C thermal@45.2C VDD_IN 3198/3217 VDD_CPU 456/456 VDD_GPU 228/228 VDD_SOC 762/752 VDD_WIFI 38/38 VDD_DDR 787/803

Framerate

Using the next pipeline we were able to measure the framerate for single capture with the perf element:

gst-launch-1.0 nvcamerasrc sensor-id=0 ! 'video/x-raw(memory:NVMM), width=(int)1928, height=(int)1208, format=(string)I420, framerate=(fraction)30/1' ! perf  ! fakesink
perf: perf0; timestamp: 1:35:55.751602001; bps: 193879.384; mean_bps: 193879.384; fps: 29.994; mean_fps: 29.994
INFO:
perf: perf0; timestamp: 1:35:56.761051137; bps: 192104.776; mean_bps: 192992.080; fps: 29.719; mean_fps: 29.856
INFO:
perf: perf0; timestamp: 1:35:57.770470774; bps: 192110.390; mean_bps: 192698.183; fps: 29.720; mean_fps: 29.811
INFO:
perf: perf0; timestamp: 1:35:58.779928270; bps: 192103.185; mean_bps: 192549.434; fps: 29.719; mean_fps: 29.788
INFO:
perf: perf0; timestamp: 1:35:59.789433771; bps: 192094.050; mean_bps: 192458.357; fps: 29.718; mean_fps: 29.774
INFO:
perf: perf0; timestamp: 1:36:00.798881673; bps: 192105.011; mean_bps: 192399.466; fps: 29.719; mean_fps: 29.765
INFO:
perf: perf0; timestamp: 1:36:01.808314377; bps: 192107.903; mean_bps: 192357.814; fps: 29.720; mean_fps: 29.758
INFO:
perf: perf0; timestamp: 1:36:02.817684397; bps: 192119.833; mean_bps: 192328.066; fps: 29.722; mean_fps: 29.754
INFO:
perf: perf0; timestamp: 1:36:03.827163605; bps: 192099.053; mean_bps: 192302.621; fps: 29.718; mean_fps: 29.750
INFO:
perf: perf0; timestamp: 1:36:04.836652768; bps: 192097.159; mean_bps: 192282.074; fps: 29.718; mean_fps: 29.747

The results show the framerate constant at just below 30FPS that use nvcamerasrc and passing frames through the ISP to convert from Bayer to YUV.

Latency

The glass to glass latency measured as described in Jetson_glass_to_glass_latency is about ~88 ms with nvcamerasrc.

gst-launch-1.0 nvcamerasrc queue-size=6 sensor-id=0 fpsRange='30 30' ! \
'video/x-raw(memory:NVMM), width=(int)1928, height=(int)1208, format=(string)I420, framerate=(fraction)30/1' ! \
nvoverlaysink sync=true enable-last-sample=false
frames glass to glass latency measurement method


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