JetPack 5.1.1 Camera Driver not Setting Gain/Exposuretime

Hi!

as seen in my other posts, we are porting a driver from Jetson Nano JP 4.6.1 Platform to the Jetson Orin NX JP 5.1.1 Platform.

So far the Camera gets detected, the v4l2 and gstreamer capturing works. Unfortunately, for some unknown reason we are unable to pass Gain / Exposure Settings to the Camera:

First try:

gst-launch-1.0 nvarguscamerasrc num-buffers=1 sensor-id=0 awblock=true aelock=true gainrange='1 1' exposuretimerange='450000 450000' ispdigitalgainrange='1 1' ! 'video/x-raw(memory:NVMM),width=3840,height=2180,framerate=25/1' ! nvvidconv flip-method=3 ! nvjpegenc ! multifilesink location=imx485.jpeg

Console Output:

gst-launch-1.0 nvarguscamerasrc num-buffers=1 sensor-id=0 awblock=true aelock=true gainrange='1 1' exposuretimerange='450000 450000' ispdigitalgainrange='1 1' ! 'video/x-raw(memory:NVMM),width=3840,height=2180,framerate=25/1' ! nvvidconv flip-method=3 ! nvjpegenc ! multifilesink location=imx485.jpeg
GST_ARGUS: NvArgusCameraSrc: Setting Gain Range : 1 1
GST_ARGUS: NvArgusCameraSrc: Setting Exposure Time Range : 450000 450000
GST_ARGUS: NvArgusCameraSrc: Setting ISP Digital Gain Range : 1 1
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3840 x 2160 FR = 33.000000 fps Duration = 30303030 ; Analog Gain range min 1.000000, max 31.622776; Exposure Range min 450000, max 400000000;

GST_ARGUS: 1920 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 31.622776; Exposure Range min 450000, max 400000000;

GST_ARGUS: Running with following settings:
   Camera index = 0
   Camera mode  = 0
   Output Stream W = 3840 H = 2160
   seconds to Run    = 0
   Frame Rate = 33.000000
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
Got EOS from element "pipeline0".
Execution ended after 0:00:00.480730112
Setting pipeline to NULL ...
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
Freeing pipeline ...

dmesg output of the Driver:

[Sep 8 10:20] test_imx485 9-001a: cam_power_on: power on
[  +0.037987] test_imx485 9-001a: 4K settings is passed
[  +0.003631] test_imx485 9-001a: imx485_set_stream (418) try to set gain to 9
[  +0.000003] test_imx485 9-001a: initial gain 9 to imx485 register
[  +0.000002] test_imx485 9-001a: IMX485_MAX_GAIN 300
[  +0.000002] test_imx485 9-001a: IMX485_MIN_GAIN 0
[  +0.000002] test_imx485 9-001a: GAIN_FACTOR 10
[  +0.000002] test_imx485 9-001a: setting gain 3 to imx485 register
[  +0.000138] test_imx485 9-001a: Framelength 3006
[  +0.000616] test_imx485 9-001a: initial exposure time: 130447
[  +0.000005] test_imx485 9-001a: setting coarse time: 669
[  +0.000665] test_imx485 9-001a: Stream ON Success
[  +0.000903] test_imx485 9-001a: Framelength 2277
[  +0.030535] test_imx485 9-001a: Framelength 3006
[  +0.306188] test_imx485 9-001a: Stream OFF Success

Second try with different Gain and Exposure:

gst-launch-1.0 nvarguscamerasrc num-buffers=1 sensor-id=0 awblock=true aelock=true gainrange='16 16' exposuretimerange='4500000 4500000' ispdigitalgainrange='1 1' ! 'video/x-raw(memory:NVMM),width=3840,height=2180,framerate=25/1' ! nvvidconv flip-method=3 ! nvjpegenc ! multifilesink location=imx485.jpeg

Console Output:

gst-launch-1.0 nvarguscamerasrc num-buffers=1 sensor-id=0 awblock=true aelock=true gainrange='16 16' exposuretimerange='4500000 4500000' ispdigitalgainrange='1 1' ! 'video/x-raw(memory:NVMM),width=3840,height=2180,framerate=25/1' ! nvvidconv flip-method=3 ! nvjpegenc ! multifilesink location=imx485.jpeg
GST_ARGUS: NvArgusCameraSrc: Setting Gain Range : 16 16
GST_ARGUS: NvArgusCameraSrc: Setting Exposure Time Range : 4500000 4500000
GST_ARGUS: NvArgusCameraSrc: Setting ISP Digital Gain Range : 1 1
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3840 x 2160 FR = 33.000000 fps Duration = 30303030 ; Analog Gain range min 1.000000, max 31.622776; Exposure Range min 450000, max 400000000;

GST_ARGUS: 1920 x 1080 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 31.622776; Exposure Range min 450000, max 400000000;

GST_ARGUS: Running with following settings:
   Camera index = 0
   Camera mode  = 0
   Output Stream W = 3840 H = 2160
   seconds to Run    = 0
   Frame Rate = 33.000000
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
Got EOS from element "pipeline0".
Execution ended after 0:00:00.491149248
Setting pipeline to NULL ...
GST_ARGUS: Cleaning up
CONSUMER: Done Success
GST_ARGUS: Done Success
Freeing pipeline ...

dmesg output:

[ +18.398975] test_imx485 9-001a: cam_power_on: power on
[  +0.036421] test_imx485 9-001a: 4K settings is passed
[  +0.003604] test_imx485 9-001a: imx485_set_stream (418) try to set gain to 9
[  +0.000002] test_imx485 9-001a: initial gain 9 to imx485 register
[  +0.000002] test_imx485 9-001a: IMX485_MAX_GAIN 300
[  +0.000002] test_imx485 9-001a: IMX485_MIN_GAIN 0
[  +0.000002] test_imx485 9-001a: GAIN_FACTOR 10
[  +0.000002] test_imx485 9-001a: setting gain 3 to imx485 register
[  +0.000134] test_imx485 9-001a: Framelength 3006
[  +0.000445] test_imx485 9-001a: initial exposure time: 130447
[  +0.000004] test_imx485 9-001a: setting coarse time: 669
[  +0.000662] test_imx485 9-001a: Stream ON Success
[  +0.000959] test_imx485 9-001a: Framelength 2277
[  +0.030523] test_imx485 9-001a: Framelength 3006
[  +0.306243] test_imx485 9-001a: Stream OFF Success

Serial Console Output:

[ 1332.478792] bwmgr API not supported
[ 1332.491532] bwmgr API not supported
[ 1332.805261] bwmgr API not supported
[ 1337.755595] bwmgr API not supported
[ 1356.162348] bwmgr API not supported
[ 1356.203728] bwmgr API not supported
[ 1356.358572] bwmgr API not supported
[ 1356.371334] bwmgr API not supported
[ 1356.687682] bwmgr API not supported

Did something change in how the settings are passed to the driver that we missed?

Any help would be greatly appreciated!

hello triemer,

it looks familiar… please see-also this thread, Topic 265700.
since you’ve porting the driver from rel-32 to rel-35. please refer to developer guide for Camera Driver Porting to review your driver implementation.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.