Parallel Camera Integration on Custom i.MX6Q Board – EOF Timeout Issue

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Parallel Camera Integration on Custom i.MX6Q Board – EOF Timeout Issue

816 次查看
Maulik_Manvar
Contributor II

Hi NXP Community,

I'm currently working on integrating a parallel camera sensor with a custom board based on the i.MX6Q. The sensor is connected via a parallel interface (not MIPI), and we're using the IPU for frame capture through the ipu2_csi1 interface. However, I'm encountering an EOF timeout during initialization.

Below is the relevant section of the device tree for reference:

TEST_CAMERA_camera: TEST_CAMERA_cam {
                compatible = "fsl,TEST_CAMERA-camera";
                clocks = <&clks IMX6QDL_CLK_CKO>;
                clock-names = "csi_mclk";
                csi_id = <1>;
                mclk = <24000000>;
                mclk_source = <0>;          
                status = "okay";
 
                port {
                        TEST_CAMERA_to_ipu2_csi1_mux: endpoint {
                                remote-endpoint = <&ipu2_csi1_mux_from_parallel_sensor>;
                                bus-width = <8>;
                                hsync-active = <0>;
                                vsync-active = <1>;
                                pclk-sample = <1>; // 1 = rising edge, 0 = falling edge
                        };
                };
};
 
 
 
&ipu2_csi1_mux_from_parallel_sensor {
        remote-endpoint = <&TEST_CAMERA_to_ipu2_csi1_mux>;
};
 
&ipu2_csi1 {
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_ipu2>;
        status = "okay";
};

 

To set up the pipeline for testing, I’ve used the following media-ctl and v4l2-ctl commands:

 

MEDIADEV="/dev/media0" 

echo "Resetting (disabling) links on $MEDIADEV..."

# 1) Disable link from TEST_CAMERAk-camera:0 -> ipu2_csi1_mux:1
media-ctl -d $MEDIADEV -l "\"TEST_CAMERAk-camera\":0 -> \"ipu2_csi1_mux\":1[0]" || true

# 2) Disable link from ipu2_csi1_mux:2 -> ipu2_csi1:0
media-ctl -d $MEDIADEV -l "\"ipu2_csi1_mux\":2 -> \"ipu2_csi1\":0[0]" || true

# 3) Disable link from ipu2_csi1:2 -> ipu2_csi1 capture:0
media-ctl -d $MEDIADEV -l "\"ipu2_csi1\":2 -> \"ipu2_csi1 capture\":0[0]" || true

echo "Enabling new links and setting up formats on $MEDIADEV..."

# 4) Enable link from TEST_CAMERAk-camera:0 -> ipu2_csi1_mux:1
media-ctl -d $MEDIADEV -l "\"TEST_CAMERAk-camera\":0 -> \"ipu2_csi1_mux\":1[1]"

# 5) Set format on TEST_CAMERAk-camera source pad
media-ctl -d $MEDIADEV -V "\"TEST_CAMERAk-camera\":0 [fmt:Y8_1X8/832x640 field:none]"

# 6) Set format on ipu2_csi1_mux sink pad
media-ctl -d $MEDIADEV -V "\"ipu2_csi1_mux\":1 [fmt:Y8_1X8/832x640 field:none]"

# 7) Enable link from ipu2_csi1_mux:2 -> ipu2_csi1:0
media-ctl -d $MEDIADEV -l "\"ipu2_csi1_mux\":2 -> \"ipu2_csi1\":0[1]"

# Set format on ipu2_csi1_mux source pad
media-ctl -d $MEDIADEV -V "\"ipu2_csi1_mux\":2 [fmt:Y8_1X8/832x640 field:none]"

# 9) Set format on ipu2_csi1 sink pad
media-ctl -d $MEDIADEV -V "\"ipu2_csi1\":0 [fmt:Y8_1X8/832x640 field:none]"

# 10) Enable link from ipu2_csi1:2 -> ipu2_csi1 capture:0
media-ctl -d $MEDIADEV -l "\"ipu2_csi1\":2 -> \"ipu2_csi1 capture\":0[1]"

# 11) Set format on ipu2_csi1 source pad (optional but often recommended)
media-ctl -d $MEDIADEV -V "\"ipu2_csi1\":2 [fmt:Y8_1X8/832x640 field:none]"

DEVICE="/dev/video7" 
WIDTH=832
HEIGHT=640
FORMAT=GREY # e.g., GREY (Y8), UYVY, etc.
OUTPUT_FILE="single_frame.raw"

# 1. Set the capture format
v4l2-ctl -d "$DEVICE" \
--set-fmt-video=width=$WIDTH,height=$HEIGHT,pixelformat=$FORMAT

# 2. Capture exactly one frame to a file
v4l2-ctl -d "$DEVICE" --stream-mmap --stream-count=5 --stream-to=$OUTPUT_FILE

 

Below is the logs:

1290.213637] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_link_setup: local_pad=0, remote_pad=1, enable=0
[ 1290.295976] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_link_setup: local_pad=0, remote_pad=1, enable=1
[ 1290.330387] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_set_fmt:
[ 1290.335339] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_try_fmt: pad=0, which=1
[ 1290.341445] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_try_fmt => w=832 h=640 code=0x2001
[ 1290.348601] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_set_fmt: set active format => w=832 h=640
[ 1295.320337] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_s_power: on=1
[ 1295.325623] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_power_on: begin
[ 1295.331027] CSI1 POWER ON
[ 1295.522415] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_power_on: done, count=0
[ 1295.529661] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_s_power: on=0
[ 1295.535881] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_power_off: begin
[ 1295.541390] CSI1 POWER OFF
[ 1295.541416] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_power_off: done, count=0
[ 1295.566732] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_s_power: on=1
[ 1295.571974] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_power_on: begin
[ 1295.577470] CSI1 POWER ON
[ 1295.772459] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_power_on: done, count=0
[ 1295.806466] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_get_fmt:
[ 1295.811276] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_get_fmt => w=832 h=640 code=0x2001
[ 1295.818602] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_s_stream: enable=1
[ 1295.824366] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_power_on: begin
[ 1295.829772] CSI1 POWER ON
[ 1296.022448] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_power_on: done, count=0
[ 1296.028571] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_s_stream: streaming ON.
[ 1306.152138] ipu2_csi1: EOF timeout
[ 1316.391964] ipu2_csi1: wait last EOF timeout
[ 1316.396457] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_s_stream: enable=0
[ 1316.402218] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_s_stream: streaming OFF.
[ 1316.416393] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_s_power: on=0
[ 1316.421651] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_power_off: begin
[ 1316.427219] CSI1 POWER OFF
[ 1316.427247] TEST_CAMERA_camera TEST_CAMERA_cam: TEST_CAMERA_power_off: done, count=0

These are accompanied by proper power-on sequences and format settings being applied, indicating that the camera driver is operational. However, it seems the IPU is not receiving any end-of-frame signals, possibly due to synchronization or signal-level issues.

Could someone please help analyze why the EOF timeout is occurring? I've attached detailed logs for further reference. Any guidance or similar experiences would be greatly appreciated.

Thanks,

Maulik

 

标签 (1)
0 项奖励
回复
2 回复数

756 次查看
Maulik_Manvar
Contributor II

Here, I have attached detailed log for reference.

0 项奖励
回复

781 次查看
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hello,

There are several IDMAC events/interrupts for system control and debug purposes. The
most import of these are EOF (end of frame) and NF (new frame). These two events are
usually used to indicate the frame status and drive the whole flow. More information please check:

https://community.nxp.com/pwmxy87654/attachments/pwmxy87654/imx-processors/231925/1/i.MX%206%20Serie...

 

Regards

0 项奖励
回复