CSI-2 and "Single-shot" mode

Hi All,

we are building a Jetson Nano based system with a custom Camera/Framegrabber. Due to a couple requirements, a so called single-shot mode is must for our target scenarios.
It means that the Framegrabber puts the camera sensor into the sleep mode till the external trigger is not come. When this external signal comes. framegrabber reads out the sensors’ data and sends image lines over CSI.
The CSI interface is initialized beforehand, a number of the frames is set via v4l2 tool.
The phenomenon we faced with is a need to “request” (at the Jetson Nano side) +3 (or+4) frames more than we expect to receive.
On the other hand, if we want to receive 1 frame (single shot mode for the camera itself), then we need to set 4 (or sometimes 5) frames in Jetson Nano video input chain. And only the 1st frame is stored (or transferred to a sink); other frames are abandoned somewhere. In this case the framegrabber must send those 4 frames (instead of 1), and the frames #2-4 are disappeared (get stuck in the SoC DMA controller?)
Maybe, guys, somebody knows the exact requirements and limitations for such scenarios (single frames, or the short series of frames). Why do we need to superadd the actual data (frames) with 3-4 dummy frames following the target ones?

Thanks in advance,
Dimitry

Hi,

How do you know that 2-4 buffers disappear? Do you dequeue these buffers but there is no data in the buffer?

I suggest to enable Video buffer 2 debug messages in order to see if there are video buffers done ready for dequeue.

echo 7 > /sys/module/videobuf2_v4l2/parameters/debug 
echo 7 > /sys/module/videobuf2_core/parameters/debug 

Sorry to tell current camera driver didn’t support trigger mode only support streaming mode.

Thanks

Hi Manuel,
we’ve not checked the buffer itself, just watching on the fact how many corresponding files are written at the v4l2 output (or how many unique frames we are able to read out by dd command). For debugging purposes our framegrabber marks the frames making them unique.

We will follow your advise, and dive deeper into the video input pipeline.

Hello ShaneCCC,

Thanks! And I just found that a similar subject was arisen already. Thus, the only way is creating a customized video-driver, right?
Is the basic (Nvidia) video-driver available in the sources?

Regards,
Dimitry

Yes, you can check the below doc to get the kernel source code.

https://docs.nvidia.com/jetson/l4t/index.html#page/Tegra%20Linux%20Driver%20Package%20Development%20Guide/kernel_custom.html#

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