Hi Team,
We’re working with a custom board based on the Jetson Orin NX module running JetPack 6.0, which includes Jetson Linux 36.3 with Kernel 5.15 and an Ubuntu 22.04 root file system.
Getting the below-shown error when trying to stream data coming through CSI2 in 4lane configuration. Could you please suggest how to debug this? Could it be due to a misconfiguration? Is there any way we could try different configurations on the fly?
tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 12500 ms
[ 787.427713] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 787.428696] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel
hello anakha.s,
may I know which CSI brick you’re using?
please note that, since it’s 4-lane configuration, Orin NX developer kit it only works with Cam0 slot (i.e. CSI-C), the other camera slot connected to CSI-B, which only works with 2-lane configuration.
We are using a custom board with CSI2 and CSI3 together for 4-lane MIPI
hello anakha.s,
please note that, Orin NX/Nano series CSI0 D1 and CSI1 D0 P/N will always been swizzled for P/N.
please use device tree property, lane_polarity
to configure a polarity swap on any lane.
since it’s CSI-C/D, please configure lane_polarity = "0";
in the device tree.
furthermore, please examine Sensor Pixel Clock since it must be set correctly to avoid potential issues.
see-also Debugging Tips sections for troubleshooting.
Hi JerryChang,
We have a camera module that is connected to the MIPI CSI-2 port. As soon as the module gets powered, it outputs data over MIPI. We have created a dummy driver based on imx185 as per the document (by commenting out the i2c read and writes). A /dev/video node gets created by the driver, but when we are trying to take the stream, the error mentioned above comes and we do not get any frames.
dtsi changes we applied
port@1 {
reg = <1>;
ptz_camera_vi_in0: endpoint {
port-index = <2>;
bus-width = <4>;
remote-endpoint = <&ptz_csi_out0>;
};
};
csi_chan1: channel@1 {
reg = <1>;
ports {
#address-cells = <1>;
#size-cells = <0>;
csi_chan1_port0: port@0 {
reg = <0>;
ptz_camera_csi_in0: endpoint@0 {
port-index = <2>;
bus-width = <4>;
remote-endpoint = <&ptz_camera_out0>;
};
};
csi_chan1_port1: port@1 {
reg = <1>;
ptz_csi_out0: endpoint@1 {
remote-endpoint = <&ptz_camera_vi_in0>;
};
};
};
};
mode0 {
mclk_khz = “24000”;
num_lanes = “4”;
tegra_sinterface = “serial_f”;
phy_mode = “DPHY”;
discontinuous_clk = “yes”;
dpcm_enable = “false”;
cil_settletime = “0”;
lane_polarity = “0”;
active_w = “1920”;
active_h = “1080”;
mode_type = “yuv”;
pixel_phase = “uyvy”;
csi_pixel_bit_depth = “16”;
readout_orientation = “90”;
line_length = “3448”;
inherent_gain = “1”;
mclk_multiplier = “9.33”;
pix_clk_hz = “300000000”;
gain_factor = “16”;
framerate_factor = “1000000”;
exposure_factor = “1000000”;
min_gain_val = “16”; /* 1.00x /
max_gain_val = “170”; / 10.66x /
step_gain_val = “1”;
default_gain = “16”; / 1.00x /
min_hdr_ratio = “1”;
max_hdr_ratio = “1”;
min_framerate = “2000000”; / 2.0 fps /
max_framerate = “30000000”; / 30.0 fps /
step_framerate = “1”;
default_framerate = “30000000”; / 30.0 fps /
min_exp_time = “13”; / us /
max_exp_time = “33333”; / us /
step_exp_time = “1”;
default_exp_time = “33333”; / us */
embedded_metadata_height = "0";
};
ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
ptz_camera_out0: endpoint {
status = “okay”;
port-index = <2>;
bus-width = <4>;
remote-endpoint = <&ptz_camera_csi_in0>;
};
};
};
hello anakha.s,
this setting is incorrect, it should be serial_c
.
is it possible for sending a reset signal when user-space try to enable camera stream in order to avoid potential issues?
We made it serial_c, but the same errors are coming, and we cannot get any frames. Could you please let us know the mapping of CSI ports to tegra_s interface? Also, is there any way we could confirm if this issue is caused by a configuration mismatch or a driver issue?
please see-also Topic 69753 for the mappings of the NVCSI and VI port-index.
Hi @JerryChang ,
I’m part of @anakha.s’s team. Thank you for your suggestions. We are able to get the data for a few seconds soon after the device boots up. After that, we get the error “tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 131072” followed by “tegra-camrtc-capture-vi tegra-capture-vi: uncorr_err: request timed out after 12500 ms
[ 192.732215] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: attempting to reset the capture channel
[ 192.733703] tegra-camrtc-capture-vi tegra-capture-vi: err_rec: successfully reset the capture channel”.
Could you please help us debug this error?