Hi, I am bring up IMX226 sensor(MIPI 4 lane CSI sensor )on ORIN Nano Chip, but I meeting the following error:
video command:
v4l2-ctl --set-fmt-video=width=4168,height=3062,pixelformat=RG12 --stream-mmap --stream-count=1 -d /dev/video0 --stream-to=imx226.raw
kernel output error log:
[ 4304.726114] bwmgr API not supported
[ 4304.784214] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 256
[ 4304.884536] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 3064, flags: 0, err_data 256
[ 4304.984664] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 6128, flags: 0, err_data 256
[ 4305.084747] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 9192, flags: 0, err_data 256
More detail kernel output log see the attach file: imx226_csi_error_log.txt
imx226_csi_error_log.txt (24.9 KB)
The IMX226 Sensor Info as following:
Here is a snippet of my camera dts:
mode0 { /* IMX226_MODE_4024x3036_30FPS */
mclk_khz = “72000”;
num_lanes = “4”;
tegra_sinterface = “serial_a”;
phy_mode = “DPHY”;
discontinuous_clk = “no”;
dpcm_enable = “false”;
cil_settletime = “0”;
lane_polarity = “6”;
active_w = “4168”;
active_h = “3062”;
mode_type = “bayer”;
pixel_phase = “rggb”;
csi_pixel_bit_depth = “12”;
readout_orientation = “0”;
line_length = “4516”;
inherent_gain = “1”;
mclk_multiplier = “6”;
pix_clk_hz = “128000000”;
gain_factor = "1";
framerate_factor = "1";
exposure_factor = "1";
min_gain_val = "0"; /* 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 = "10000000";
max_framerate = "10000000";
step_framerate = "1";
default_framerate = "10000000"; /* 30.0 fps */
min_exp_time = "864"; /* us */
max_exp_time = "20480"; /* us */
step_exp_time = "1";
default_exp_time = "20480"; /* us */
embedded_metadata_height = "0";
};
pix_clk_hz = Htotal * Vtotal * FPS = 4168 * 3062 * 10 = 127624160 ~= 128000000
Can somebody help me ? Thanks a lot!
Check below NOTE
Skew calibration is required if sensor or deserializer is using DPHY, and the output data rate is > 1.5Gbps.
An initiation deskew signal should be sent by sensor or deserializer to perform the skew calibration. If the deskew signals is not sent, the receiver will stall, and the capture will time out.
You can calculate the output data rate with the following equation:
Output data rate = (sensor or deserializer pixel clock in hertz) * (bits per pixel) / (number of CSI lanes)
@ShaneCCC Thanks your quick reply, In my application scenario, we do not used the serializer/deserializer chip.
The imx226 sensor is directly connected to the mipi interface.
For the following error log, I have some Confuse:
[ 4304.755189] [RCE] MIPI clock = 192000 kHz, tHS-SETTLE = 0, tCLK-SETTLE = 0
[yu.xing] THe MIPI Clock is MIPI DPHY clock ? How does the mipi driver get the MIPI clock
[ 4304.755191] [RCE] tegra_nvcsi_stream_open(vm0, stream=0, csi=0)
[ 4304.755193] [RCE] nvcsi_calc_ths_settle ths_settle 38
[ 4304.755194] [RCE] nvcsi_calc_ths_settle ths_settle 38
[ 4304.755195] [RCE] nvcsi_calc_ths_settle ths_settle 38
[ 4304.755197] [RCE] nvcsi_calc_tclk_settle tclk_settle 35
[ 4304.784214] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 0, flags: 0, err_data 256
[ 4304.807535] [RCE] ISR PHY 0 CIL_A 0x110
[ 4304.807540] [RCE] ISR PHY 0 CIL_B 0x110
[ 4304.807543] [RCE] VI5: vi5_irq_process_channel_event invoked: CH35_INT_STATUS = 0x11
[ 4304.807545] [RCE] VI5: vi5_handle_sof(35)
[ 4304.807548] [RCE] VI5: vi5_irq_process_channel_event: ch35 engine status=0x00000100 task 1
[ 4304.807551] [RCE] VI5: error_to_notify_bits Channel FALCON_ERROR identified
[ 4304.807554] [RCE] VI5: vi5_notify_error(35) status 0xe tag 0x0, data 0x100
[yu.xing] How to understand the above error message?
[ 4304.807556] [RCE] VI5: Error 14 delivered to capture channel 0.
[ 4304.807559] [RCE] VI5: PFSD enabled for channel: NO, expected_count. 0
[ 4304.807562] [RCE] VI5: channel_submit(35, bfebf300)
[ 4304.807564] [RCE] VI5: completion_actions[8] size = 30, next offset = 314
[ 4304.807568] [RCE] VI5: completion_actions[0] size = 31, next offset = 345
[ 4304.807570] [RCE] VI5: completion_actions[2] size = 14, next offset = 359
[ 4304.807573] [RCE] VI5: completion_actions[1] size = 30, next offset = 389
[ 4304.807575] [RCE] VI5: completion_actions[4] size = 14, next offset = 403
[ 4304.807578] [RCE] VI5: completion_actions[3] size = 14, next offset = 417
[ 4304.807580] [RCE] VI5: completion_actions[5] size = 2, next offset = 419
[ 4304.807583] [RCE] VI5: vi5_update_streams: ch=35 stream_mask=0x01
[ 4304.884536] tegra-camrtc-capture-vi tegra-capture-vi: corr_err: discarding frame 3064, flags: 0, err_data 256
[ 4304.919733] [RCE] VI5: vi5_process_error_fifo: tag=0x02 ch=0 frame=0 ts=4327403594944 data=0x000000a0 ext_data=0x00000bf8
Looks like your output rate < 1.5Gbps suppose doesn’t matter with deskew calibration.
Please boost the clocks and get the trace log to check.
Thanks
https://elinux.org/Jetson/l4t/Camera_BringUp
@ShaneCCC I had boost the clocks, the output as following:
root@ubuntu:/home/nv# ./clk_cfg.sh
nvvi_clk_rate: 550400000
nvisp_clk_rate: 729600000
nvcsi_clk_rate: 214300000
Enable nvcsi debug trace, from the trace log, I get the following error:
More detailed log please reference the log file:
nvcsi_imx226_sensor_error_trace.log (18.0 MB)
kworker/3:2-114 [003] … 390.945330: rtcpu_nvcsi_intr: tstamp:12919663807 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
[yu.xing] how to understand class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.837047: rtcpu_vinotify_event: tstamp:12917128294 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:413338276544 data:0x715cff0010000000
kworker/3:2-114 [003] … 390.837047: rtcpu_vinotify_event: tstamp:12917128553 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:413338286528 data:0x0000000031000001
kworker/3:2-114 [003] … 390.837047: rtcpu_vinotify_event: tstamp:12917128837 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:413338642784 data:0x715cfc0010000000
kworker/3:2-114 [003] … 390.837048: rtcpu_vinotify_event: tstamp:12917129085 cch:0 vi:0 tag:VIFALC_TDSTATE channel:0x23 frame:0 vi_tstamp:413338652896 data:0x0000000031000002
kworker/3:2-114 [003] … 390.945330: rtcpu_nvcsi_intr: tstamp:12919663807 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945332: rtcpu_nvcsi_intr: tstamp:12919663807 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945332: rtcpu_nvcsi_intr: tstamp:12919665161 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945333: rtcpu_nvcsi_intr: tstamp:12919665161 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945334: rtcpu_nvcsi_intr: tstamp:12919666030 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945334: rtcpu_nvcsi_intr: tstamp:12919666030 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945335: rtcpu_nvcsi_intr: tstamp:12919666888 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945335: rtcpu_nvcsi_intr: tstamp:12919666888 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945335: rtcpu_nvcsi_intr: tstamp:12919667823 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945336: rtcpu_nvcsi_intr: tstamp:12919667823 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945336: rtcpu_nvcsi_intr: tstamp:12919668820 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945337: rtcpu_nvcsi_intr: tstamp:12919668820 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945337: rtcpu_nvcsi_intr: tstamp:12919669824 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945337: rtcpu_nvcsi_intr: tstamp:12919669824 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945338: rtcpu_nvcsi_intr: tstamp:12919670826 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945338: rtcpu_nvcsi_intr: tstamp:12919670826 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945339: rtcpu_nvcsi_intr: tstamp:12919671827 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945339: rtcpu_nvcsi_intr: tstamp:12919671827 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945340: rtcpu_string: tstamp:12919672753 id:0x04010000 str:“VI5: vi5_irq_process_channel_event invoked: CH35”
kworker/3:2-114 [003] … 390.945342: rtcpu_nvcsi_intr: tstamp:12919672836 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945342: rtcpu_nvcsi_intr: tstamp:12919672836 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945342: rtcpu_string: tstamp:12919674562 id:0x04010000 str:"_INT_STATUS = 0x11
"
kworker/3:2-114 [003] … 390.945353: rtcpu_nvcsi_intr: tstamp:12919673833 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945353: rtcpu_nvcsi_intr: tstamp:12919673833 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945353: rtcpu_nvcsi_intr: tstamp:12919674834 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945354: rtcpu_nvcsi_intr: tstamp:12919674834 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945354: rtcpu_nvcsi_intr: tstamp:12919675837 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945355: rtcpu_nvcsi_intr: tstamp:12919675837 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945355: rtcpu_nvcsi_intr: tstamp:12919676840 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945355: rtcpu_nvcsi_intr: tstamp:12919676840 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945356: rtcpu_string: tstamp:12919677741 id:0x04010000 str:"VI5: vi5_handle_sof(35)
"
kworker/3:2-114 [003] … 390.945360: rtcpu_nvcsi_intr: tstamp:12919677845 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945360: rtcpu_nvcsi_intr: tstamp:12919677845 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945361: rtcpu_nvcsi_intr: tstamp:12919678890 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945361: rtcpu_nvcsi_intr: tstamp:12919678890 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945362: rtcpu_nvcsi_intr: tstamp:12919679873 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945362: rtcpu_nvcsi_intr: tstamp:12919679873 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945362: rtcpu_nvcsi_intr: tstamp:12919680851 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945363: rtcpu_nvcsi_intr: tstamp:12919680851 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945363: rtcpu_nvcsi_intr: tstamp:12919681855 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945364: rtcpu_nvcsi_intr: tstamp:12919681855 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945364: rtcpu_nvcsi_intr: tstamp:12919682854 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945364: rtcpu_nvcsi_intr: tstamp:12919682854 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945365: rtcpu_nvcsi_intr: tstamp:12919683859 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945365: rtcpu_nvcsi_intr: tstamp:12919683859 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945366: rtcpu_nvcsi_intr: tstamp:12919684860 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945366: rtcpu_nvcsi_intr: tstamp:12919684860 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945366: rtcpu_string: tstamp:12919685737 id:0x04010000 str:"VI5: vi5_irq_process_channel_event: ch35 engine "
kworker/3:2-114 [003] … 390.945367: rtcpu_nvcsi_intr: tstamp:12919685865 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945368: rtcpu_nvcsi_intr: tstamp:12919685865 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/3:2-114 [003] … 390.945368: rtcpu_string: tstamp:12919686761 id:0x04010000 str:"status=0x00000100 task 1
It tell the package header ecc/crc error.
@ShaneCCC For the error, can you give some fixed method ,
Maybe disable csi host ecc ?
if yes, how to disable ecc in nvidia orin nano platform ?
Thanks a lot!
Current didn’t have a way to disable it.
Thanks
@ShaneCCC For this question, do you have any comments on dbeug?
What triggers these kinds of problems, Is it a sensor vendor problem?
Suppose it could be the sensor output package header didn’t include ecc/crc context.
Thanks
OK, Thanks, We will check it.
@ShaneCCC I have a question, the package header ecc/crc is a private mechanism only for Nvidia ?
Suppose not. Some early platform like TX1 don’t check the ECC/CRC.
@ShaneCCC OK , thanks, As the following DTS setting, I had a doubt:
mode0 { /* IMX226_MODE_4024x3036_30FPS */
mclk_khz = “72000”; // The mclk_khz is the camera sensor reference clk(input clock)? **
** // if the camera sensor module clock is generated by itself, so in DTS, we should no need setting it ?
num_lanes = “4”;
tegra_sinterface = “serial_a”;
phy_mode = “DPHY”;
discontinuous_clk = “yes”;
dpcm_enable = “false”;
cil_settletime = “0”;
lane_polarity = “6”;
active_w = “4168”;
active_h = “3062”;
mode_type = “bayer”;
pixel_phase = “rggb”;
csi_pixel_bit_depth = “12”;
readout_orientation = “0”;
line_length = “4516”;
inherent_gain = “1”;
mclk_multiplier = “6”;
pix_clk_hz = “128000000”;
}
Suppose you can set it as any value if don’t use it.
@ShaneCCC We have not solved the problem, Can you give some debugging advice ?
We have confirmed with the sensor factory that when the sensor originally outputs images, it comes with packet header ECC
Sorry, it pay load data ecc/crc error instead of PH
err_intr_stat_pd_crc_err_vc0
So, How to solve these error ?
The same check with vendor.
Thanks