Hi, I am working with an Orin NX JP 5.1.1 on a custom carrier board. I have been running streaming stability tests for 2 MIPI sensors. I am able to capture frames from both sensors. I have been doing start/stop stream cycles on the sensors and I have seen the stream has errors when starting a stream.
This is the command I used for captures in v4l2 with a 1 second delay between each capture cycle:
v4l2-ctl -d /dev/video0 --set-fmt-video=width=3840,height=2160,pixelformat=BG12 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=150
I will see 30fps output from the sensor for a while but after ~20min v4l2 will not show a framerate output and I get these error messages in the kernel log:
[ 2007.143818] ox08b40 2-0030: ox08b40_power_on: power on
[ 2007.172784] ox08b40 2-0030: ox08b40_software_reset: Sending first software reset command
[ 2007.173107] ox08b40 2-0030: ox08b40_software_reset: Sending second software reset command
[ 2007.191366] bwmgr API not supported
[ 2007.199513] ox08b40 2-0030: ox08b40_set_mode: selecting mode 0
[ 2007.271310] ox08b40 2-0030: ox08b40_set_gain: gain requested: hcg {12, 0}, lcg {3, 0}, spd {1, 0}
[ 2007.275503] ox08b40 2-0030: ox08b40_set_exposure: requested exposure time: 4945 us
[ 2007.275511] ox08b40 2-0030: ox08b40_set_exposure: exposure time (double rows): 168
[ 2007.279389] ox08b40 2-0030: ox08b40_set_frame_rate: refuse frame rate change
[ 2007.279396] ox08b40 2-0030: ox08b40_start_streaming
[ 2007.279402] ox08b40 2-0030: ox08b40_start_streaming: setting frame sync follower
[ 2009.798336] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 2009.807479] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 2009.818481] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 2009.826206] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[ 2009.836869] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 2009.844588] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found for stream- 0 vc- 0
[ 2009.855296] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
I have also done tests with gstreamer using a similar capture cycle with 1s delays. The gstreamer pipeline is:
gst-launch-1.0 -v nvarguscamerasrc sensor-id=0 num-buffers=150 ! "video/x-raw(memory:NVMM),format=NV12,width=3840,height=2160" ! nvvidconv ! fakesink
After ~30min these cycles also trigger an error:
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstNvArgusCameraSrc:nvarguscamerasrc0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)NV12, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)NV12, framerate=(fraction)30/1
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:src: caps = video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)NV12, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstFakeSink:fakesink0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)NV12, framerate=(fraction)30/1
/GstPipeline:pipeline0/Gstnvvconv:nvvconv0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)NV12, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = video/x-raw(memory:NVMM), width=(int)3840, height=(int)2160, format=(string)NV12, framerate=(fraction)30/1
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3840 x 2160 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 1.375000; Exposure Range min 59000, max 32003000;
GST_ARGUS: Running with following settings:
Camera index = 0
Camera mode = 0
Output Stream W = 3840 H = 2160
seconds to Run = 0
Frame Rate = 29.999999
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
nvbuf_utils: dmabuf_fd -1 mapped entry NOT found
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadExecute:694 NvBufSurfaceFromFd Failed.
Error generated. /dvs/git/dirty/git-master_linux/multimedia/nvgstreamer/gst-nvarguscamera/gstnvarguscamerasrc.cpp, threadFunction:247 (propagating)
Got EOS from element "pipeline0".
The kernel log does not show an error but seems to be hanging after starting a stream:
[ 489.946628] ox08b40 2-0030: ox08b40_power_on: power on
[ 489.974948] ox08b40 2-0030: ox08b40_software_reset: Sending first software reset command
[ 489.975090] ox08b40 2-0030: ox08b40_software_reset: Sending second software reset command
[ 489.991278] bwmgr API not supported
[ 489.999219] ox08b40 2-0030: ox08b40_set_mode: selecting mode 0
[ 490.073833] ox08b40 2-0030: ox08b40_set_gain: gain requested: hcg {12, 0}, lcg {3, 0}, spd {1, 0}
[ 490.077361] ox08b40 2-0030: ox08b40_set_exposure: requested exposure time: 32003 us
[ 490.077367] ox08b40 2-0030: ox08b40_set_exposure: exposure time (double rows): 1092
[ 490.082563] ox08b40 2-0030: ox08b40_set_frame_rate: refuse frame rate change
[ 490.082570] ox08b40 2-0030: ox08b40_start_streaming
[ 490.082576] ox08b40 2-0030: ox08b40_start_streaming: setting frame sync follower
What could cause these issues? Is there a fix to improve the stability of the capture?