Orin Nano Mipi Video Capture

Hi all,
I am trying to capture the RGB888 mipi csi2 data from an FPGA without I2C.
I am using Jetson Orin Nano Developer kit and JetPack 5.1.1 .

My changes are below;

  1. Changed dts file (tegra234-camera-rbpcv2-imx219.dtsi)

tegra234-camera-rbpcv2-imx219.dtsi (25.8 KB)

  1. Modified nv_imx219 driver. I removed I2C functions.
    imx219_mode_tbls.h (1.3 KB)
    nv_imx219.c (9.0 KB)

Then, /dev/video0 file created after reboot.

Also, v4l2-ctl response is below;
v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture

[0]: 'AR24' (32-bit BGRA 8-8-8-8)
	Size: Discrete 1280x720
		Interval: Discrete 0.033s (30.000 fps)

But, when I called gst-launch-1.0 v4l2src ! video/x-raw,width=1280,height=720,format=BGRA ! videoconvert ! autovideosink, I didnt get any frame.

In dmesg log:

[ 2284.770151] tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 2500 ms
[ 2284.779318] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 2284.789910] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 2284.797762] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_close: Error in closing stream_id=0, csi_port=0
[ 2284.808588] (NULL device *): vi_capture_control_message: NULL VI channel received
[ 2284.816458] t194-nvcsi 13e40000.host1x:nvcsi@15a00000: csi5_stream_open: VI channel not found> Blockquote for stream- 0 vc- 0
[ 2284.827899] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel

trace log
trace.log (32.0 KB)

My questions;

  1. Do you have any suggestions to get frame successfully?
  2. Are there any missing steps?
  3. I don’t understand why the pixel format is AR24 (in v4l2-ctl log). The variable “pixel_t” in the extract_pixel_format function (sensor_common.c) returns rgb_rgb88824. Is this normal?

Thanks in advance.

The format is correct.
From the trace log it tell didn’t receive any validate data from MIPI bus.
Maybe probe the MIPI signal to confirm.

Note that the original IMX219 driver does only provide bayer data, that is usually debayered by ISP using Argus.

I’d suggest that you first try to get the camera stream with V4L:

v4l2-ctl -d /dev/video0 --set-ctrl=bypass_mode=0,sensor_mode=0 --set-fmt-video=width=1280,height=720,pixelformat=RGGB --stream-mmap

When it works, with gstreamer you may try:

v4l2-ctl -d /dev/video0 --set-ctrl=bypass_mode=0,sensor_mode=0 --set-fmt-video=width=1280,height=720,pixelformat=RGGB --stream-mmap --stream-to=- | gst-launch-1.0 filesrc location=/dev/stdin blocksize=$(expr 1280 \* 720) ! video/x-bayer,format=rggb,width=1280,height=720,framerate=30/1 ! queue ! bayer2rgb ! queue ! videoconvert ! xvimagesink

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