I have a camera working on the agx orin platform. When I use the master mode receiver on the sensor side, I can capture the video stream through the following commands:
v4l2-ctl --set-fmt-video=width=4128,height=3008,pixelformat=RG12 --set-ctrl bypass_mode=0 --stream-skip=30 --stream-mmap --stream-count=1 --stream-to=ov1081.raw -d /dev/video0
When I use the trig function on the Sensor side, I use a third party to synchronize and trigger the clock, and the frequency is 29HZ, which is consistent with the master mode. The MIPI signal can be measured, but the video stream cannot be obtained.
do you meant there’s hardware sync pin for your multi-cam modules?
could you please give more details, for example, may I know how the synchronize works?
I use a single camera, and I use an external trigger to simulate XTRIG signal. XHS uses orin’s clock 37.125Mhz. When XTRIG signal comes, camera starts to expose and generate data, and the data enters orin through MIPI, CSI and VI.
please check low-level VI driver,
there’s by default configure CAPTURE_TIMEOUT_MS as 2500ms. you may increasing that for external trigger use-case.
for example, $public_source/kernel_src/kernel/nvidia/drivers/media/platform/tegra/camera/vi/vi5_fops.c
#define CAPTURE_TIMEOUT_MS 2500
static void vi5_capture_dequeue()
...
/* Dequeue a frame and check its capture status */
err = vi_capture_status(chan->tegra_vi_channel[vi_port], CAPTURE_TIMEOUT_MS);
you may also running gst pipeline with -e flag, for sending an EoS at shutdown
for example, $ gst-launch-1.0 -e v4l2src device=/dev/video<X> ! "video/x-raw, format=(string)UYVY, width=(int)1280, height=(int)720" ! jpegenc ! multifilesink location=capture%d.jpeg
however,
may I know what’s the actual use-case, what’s the time interval for every external trigger?
it’s configuration to increase timeout value, it doesn’t meant it could configure one huge timeout value to wait for external trigger pulse infinitely.
that’s data-corrupting general error, do you also seeing the error with General error queue is out of sync with frame queue...? that should also show the notification bits for analysis.
please share complete VI tracing logs for checking.
furthermore, is it possible for probing the MIPI signaling to ensure there’s data on the CSI channel?
I measured with an oscilloscope and confirmed that there was a MIPI signal when cmos work in trig mode.
the file “trace-20230704-1.txt” is cmos work in trig mode, and can’t get image.
the file “trace-20230705-3-success.txt” is cmos work in master mode, and can get image.
the v4l2 commad same is “v4l2-ctl --set-fmt-video=width=4128,height=3008,pixelformat=RG12 --set-ctrl bypass_mode=0 --stream-skip=0 --stream-mmap --stream-count=1 --stream-to=/dev/null -d /dev/video0”.
and i compare the two trace file , found some difference, but i don’t know what that means( CHANSEL_SHORT_FRAME and CHANSEL_PXL_EOF ).
the “active_h” on dts value is 3008, i try to change it to 3000\2992\2976\2160, the result is same, v4l2 can’t get image, and tarce log is same as before.
what’s the data follow by CHANSEL_SHORT_FRAME failure? is it still same as 0x0bbc.... 0xbbc shows the receiving image height, it’s start from 0. so, it means there’re 3005-lines sending to VI engine. whereas your active_h=3008; the expect result should be 0xbbf.
do you mean i should change active_h to 3005? i try set active_h=3005, but still can’t get any image, the dmesg and trace is same as before.
i just change active_h in dts file, not change cmos driver and v4l2 command, it is ok?
another question, in the success trace file( trace-20230705-3-success.txt), one CHANSEL_PXL_SOF will match one CHANSEL_PXL_EOF, but in fail trace file, only exist CHANSEL_PXL_SOF, can’t find the CHANSEL_PXL_EOF, is means some error?
please change device tree and also sensor driver to have less lines for testing.
v4l command-line should assign the same format as it reported by… $ v4l2-ctl -d /dev/video0 --list-formats-ext
your understanding is correct. the active stream should have one CHANSEL_PXL_SOF match to one CHANSEL_PXL_EOF.
EOF is missing for your failure case since there’s an error CHANSEL_SHORT_FRAME triggered.
hi JerryChang,
the trig mode work success, it is a sensor dirver problem , we only changed sensor dirver code , then , we get right image.
thanks for your reply and sugguest.