ON Semiconductor AR0144 Linux driver

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


ON Semiconductor AR0144 Features

The AR0144 is a 1/4-inch 1.0 Mp CMOS digital image sensor with an active pixel array of 1280H x 800V. It incorporates a new innovative global shutter pixel design optimized for accurate and fast capture of moving scenes. The sensor produces clear, low noise images in both low-light and bright scenes. It includes sophisticated camera functions such as auto exposure control, windowing, row skip mode, column-skip mode, pixel-binning, and both video and single frame modes. It is programmable through a simple two-wire serial interface. The AR0144 produces extraordinarily clear, sharp digital pictures, and its ability to capture both continuous video and single frames makes it the perfect choice for a wide range of applications, including scanning and industrial inspection.[1]

AR0144 Linux driver support

RidgeRun has developed a driver for the following platforms:

  • NVIDIA Jetson TX2
  • NXP i.MX8
  • SnapDragon

The driver has the following support:

Jetson TX2

TODO

i.MX8MQ

  • Linux 4.14.98
  • V4l2 Subdevice
  • Tested at 1280x800@30fps
  • 8bpp monochrome
  • Capture with v4l2src

i.MX8M Plus

  • Linux 5.10.35
  • V4l2 Subdevice
  • Tested at 1280x800@30fps
  • 12bpp color
  • Capture with v4l2src

SnapDragon

  • Linux 4.14
  • V4l2 Media controller driver
  • Tested resolutions 1280x800 and 640x400 (2x2 binning) with framerates up to 59fps
  • 8, 10 and 12bpp monochrome
  • Capture with v4l2src (8bpp) and yavta (10bpp and 12 bpp).

Enabling the AR0144 Linux driver

Jetson TX2

TODO

i.MX8

 Location:                                                                                                                                                                                            
   -> Device Drivers  
     -> Multimedia support (MEDIA_SUPPORT [=y])
       -> I2C Encoders, decoders, sensors and other helper chips
         -> OnSemi camera sensors (VIDEO_ONSEMI_SENSORS [=y])
           -> AR0144 (VIDEO_ONSEMI_AR0144 [=y])

SnapDragon

   Location:                                                                                                                                                                                            
     -> Device Drivers
       -> Multimedia support (MEDIA_SUPPORT [=m])
       -> Sensors used on soc_camera driver
         -> OnSemi camera sensors (VIDEO_ONSEMI_SENSORS [=y])
           -> <M>   AR0144 (VIDEO_ONSEMI_AR0144 [=m])

GStreamer Examples: Testing a AR0144 Linux driver

Capture

Jetson TX2

TODO

The sensor will capture in the TODO mode

Setting pipeline to PAUSED ...

Available Sensor modes : 
3840 x 2160 FR=30.000000 CF=0x1209208a10 SensorModeType=4 CSIPixelBitDepth=10 DynPixelBitDepth=10
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...

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

New clock: GstSystemClock

i.MX8

  • 1280x800@30fps
gst-launch-1.0 v4l2src ! video/x-raw,width=1280,height=800,framerate=30/1,format=GRAY8 ! videoconvert ! waylandsink sync=false -v
  • 1280x800@20fps
gst-launch-1.0 v4l2src ! video/x-raw,width=1280,height=800,framerate=20/1,format=GRAY8 ! videoconvert ! waylandsink sync=false -v

SnapDragon

Snapdragon uses Media Controller, so before being able to capture, the modules need to be properly linked and configured.

  • Link modules: This configuration will use the VFE RDI (raw dump interface) as the PIX interface doesn't support raw video.
media-ctl -d /dev/media0 -l '"msm_csiphy0":1->"msm_csid0":0[1],"msm_csid0":1->"msm_ispif0":0[1],"msm_ispif0":1->"msm_vfe0_rdi0":0[1]'

You will need to configure the modules for the desired resolution and format:

  • Configure format and resolution for RAW8 1280x800
media-ctl -d /dev/media0 -V '"ar0144 4-0020":0[fmt:Y8_1X8/1280x800 field:none],"msm_csiphy0":0[fmt:Y8_1X8/1280x800 field:none],"msm_csid0":0[fmt:Y8_1X8/1280x800 field:none],"msm_ispif0":0[fmt:Y8_1X8/1280x800 field:none],"msm_vfe0_rdi0":0[fmt:Y8_1X8/1280x800 field:none]'


  • 2x2 Binning configuration

When capturing at 640x400, 2x2 binning mode has to be configured as follows:

v4l2-ctl -d /dev/v4l-subdev10 --set-ctrl=horizontal_skipping=1
v4l2-ctl -d /dev/v4l-subdev10 --set-ctrl=vertical_skipping=1
v4l2-ctl -d /dev/v4l-subdev10 --set-ctrl=row_binning=1
v4l2-ctl -d /dev/v4l-subdev10 --set-ctrl=col_binning=1


  • 1280x800@30fps capture using GStreamer
DISPLAY=:0.0 GST_DEBUG=WARNING gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=GRAY8,width=1280,height=800 ! queue ! videoconvert ! xvimagesink -v sync=false


  • 1280x800@30fps RAW8 capture using Yavta
yavta /dev/video0 -c600 -n6 -s1280x800 --enum-formats -fY8


  • 1280x800@30fps RAW10 capture using Yavta
yavta /dev/video0 -c600 -n6 -s1280x800 --enum-formats -fY10P


  • 1280x800@30fps RAW12 capture using Yavta
yavta /dev/video0 -c100 -n6 -s1280x800 --enum-formats -fSBGGR12P


  • 1280x800@50fps RAW12 capture using Yavta
yavta /dev/video0 -c100 -n6 -s1280x800 --enum-formats -fSBGGR12P --time-per-frame 1/50

Video Encoding

Jetson TX2

TODO

The sensor will capture in the TODO mode and the pipeline will encode the video and save it into test.ts file.

i.MX8

TODO

The sensor will capture in the TODO mode and the pipeline will encode the video and save it into test.ts file.

SnapDragon

TODO

The sensor will capture in the TODO mode and the pipeline will encode the video and save it into test.ts file.

Dual Capture + Encoding

TODO

The sensor will capture from TODO cameras in the TODO mode and the pipeline will encode the videos and save them into test_0.ts and test_1.ts files.

AR0144 Performance measurements

ARM Load

Jetson TX2

TODO

Tegrastats display the following output when capturing with the sensor:

RAM 1263/7855MB (lfb 1501x4MB) CPU [0%@2035,off,off,0%@2035,0%@2035,0%@2035] 
RAM 1263/7855MB (lfb 1501x4MB) CPU [23%@960,off,off,17%@960,16%@960,23%@960] 
RAM 1263/7855MB (lfb 1500x4MB) CPU [17%@345,off,off,17%@345,18%@345,20%@345] 
RAM 1263/7855MB (lfb 1500x4MB) CPU [20%@345,off,off,16%@345,18%@345,15%@345] 
RAM 1263/7855MB (lfb 1500x4MB) CPU [19%@345,off,off,13%@345,15%@345,14%@345] 
RAM 1263/7855MB (lfb 1500x4MB) CPU [20%@345,off,off,15%@345,12%@345,15%@345] 
RAM 1263/7855MB (lfb 1500x4MB) CPU [19%@345,off,off,15%@345,15%@345,16%@345] 
RAM 1263/7855MB (lfb 1500x4MB) CPU [20%@345,off,off,18%@345,18%@345,17%@345] 
RAM 1263/7855MB (lfb 1500x4MB) CPU [16%@345,off,off,15%@345,27%@345,17%@345] 
RAM 1263/7855MB (lfb 1500x4MB) CPU [19%@345,off,off,18%@345,17%@345,19%@345] 

i.MX8

TODO

SnapDragon

TODO

Framerate

Jetson TX2

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

TODO
GST-PERF INFO -->  Timestamp: 0:07:19.108602798; Bps: 782; fps: 30.0 
GST-PERF INFO -->  Timestamp: 0:07:20.141189052; Bps: 782; fps: 30.3 
GST-PERF INFO -->  Timestamp: 0:07:21.174265435; Bps: 782; fps: 30.0 
GST-PERF INFO -->  Timestamp: 0:07:22.207318757; Bps: 782; fps: 30.0 
GST-PERF INFO -->  Timestamp: 0:07:23.240543516; Bps: 782; fps: 30.0 
GST-PERF INFO -->  Timestamp: 0:07:24.273697886; Bps: 782; fps: 30.0 
GST-PERF INFO -->  Timestamp: 0:07:25.306822764; Bps: 782; fps: 30.0 
GST-PERF INFO -->  Timestamp: 0:07:26.340117514; Bps: 782; fps: 30.0 
GST-PERF INFO -->  Timestamp: 0:07:27.373087284; Bps: 782; fps: 30.3 
GST-PERF INFO -->  Timestamp: 0:07:28.406069581; Bps: 782; fps: 30.3 
GST-PERF INFO -->  Timestamp: 0:07:29.439238457; Bps: 782; fps: 30.0 
GST-PERF INFO -->  Timestamp: 0:07:30.472398102; Bps: 782; fps: 30.0 
GST-PERF INFO -->  Timestamp: 0:07:31.472948042; Bps: 808; fps: 30.0 

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

i.MX8

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

TODO

SnapDragon

Using the next pipeline we were able to measure the framerate for single capture with v4l2-ctrl:

  • 1280x800@30fps, RAW8
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=800,pixelformat=GREY --set-parm 30 --stream-mmap
Frame rate set to 30.000 fps
[ 1541.976821] ar0144 4-0020: ar0144_pll_calculate: code=2001, bpp=8, frame=1280x800 [4x4+1280x800]
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.01 fps
  • 1280x800@50fps, RAW8
v4l2-ctl -d /dev/video0 --set-fmt-video=width=1280,height=800,pixelformat=GREY --set-parm 50 --stream-mmap
Frame rate set to 50.000 fps
[ 1626.444759] ar0144 4-0020: ar0144_pll_calculate: code=2001, bpp=8, frame=1280x800 [4x4+1280x800]
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.04 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.04 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.04 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.04 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 50.05 fps

AR0144 Latency measurement

The glass to glass latency measured is about TODO ms with nvcamerasrc.

See also



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.