Fail to capture raw data using v4l2-utils in nvidia xavier nx

Hi Team,
I Connect 2 lane ov2311 monochrome camera with Nvidia Xavier nx. while I’m trying to capture raw data using v4l2-utis then I’m getting the following error in dmesg.

dmesg log
[ 49.645000] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 230, err_data 4194912
[ 49.661473] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 224, err_data 4194912
[ 49.761029] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 166, err_data 544
[ 49.777588] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 224, err_data 4194912

**ftrace logs **

kworker/0:3-1912 [000] … 70.981397: rtcpu_nvcsi_intr: tstamp:2677366291 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00001040
kworker/0:3-1912 [000] … 70.981397: rtcpu_nvcsi_intr: tstamp:2677366829 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x10000040
kworker/0:3-1912 [000] … 70.981397: rtcpu_nvcsi_intr: tstamp:2677367192 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x10000040
kworker/0:3-1912 [000] … 70.981397: rtcpu_nvcsi_intr: tstamp:2677367192 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00001040
kworker/0:3-1912 [000] … 70.981398: rtcpu_nvcsi_intr: tstamp:2677367734 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x10000040
kworker/0:3-1912 [000] … 70.981398: rtcpu_nvcsi_intr: tstamp:2677367734 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00001040
kworker/0:3-1912 [000] … 70.981398: rtcpu_nvcsi_intr: tstamp:2677369043 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x10000040
kworker/0:3-1912 [000] … 70.981398: rtcpu_nvcsi_intr: tstamp:2677369043 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00001040
kworker/0:3-1912 [000] … 70.981398: rtcpu_nvcsi_intr: tstamp:2677369583 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x10000040
kworker/0:3-1912 [000] … 70.981398: rtcpu_nvcsi_intr: tstamp:2677369583 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00001040
kworker/0:3-1912 [000] … 70.981399: rtcpu_nvcsi_intr: tstamp:2677370505 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x10000040
kworker/0:3-1912 [000] … 70.981399: rtcpu_nvcsi_intr: tstamp:2677370505 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00001040
kworker/0:3-1912 [000] … 70.981399: rtcpu_nvcsi_intr: tstamp:2677371042 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x10000040
kworker/0:3-1912 [000] … 70.981399: rtcpu_nvcsi_intr: tstamp:2677371042 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00001040
kworker/0:3-1912 [000] … 70.981399: rtcpu_nvcsi_intr: tstamp:2677371969 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x10000040
kworker/0:3-1912 [000] … 70.981399: rtcpu_nvcsi_intr: tstamp:2677371969 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00001040
kworker/0:3-1912 [000] … 70.981400: rtcpu_nvcsi_intr: tstamp:2677372509 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x10000040
kworker/0:3-1912 [000] … 70.981400: rtcpu_nvcsi_intr: tstamp:2677372509 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00001040
kworker/0:3-1912 [000] … 70.981400: rtcpu_nvcsi_intr: tstamp:2677373429 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x10000040
kworker/0:3-1912 [000] … 70.981400: rtcpu_nvcsi_intr: tstamp:2677373429 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00001040
kworker/0:3-1912 [000] … 70.981400: rtcpu_nvcsi_intr: tstamp:2677373966 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x10000040
kworker/0:3-1912 [000] … 70.981400: rtcpu_nvcsi_intr: tstamp:2677373966 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00001040
kworker/0:3-1912 [000] … 70.981401: rtcpu_nvcsi_intr: tstamp:2677375260 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x10000040
kworker/0:3-1912 [000] … 70.981401: rtcpu_nvcsi_intr: tstamp:2677375260 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00001040
kworker/0:3-1912 [000] … 70.981401: rtcpu_nvcsi_intr: tstamp:2677376720 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x10000040
kworker/0:3-1912 [000] … 70.981401: rtcpu_nvcsi_intr: tstamp:2677376720 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00001040
kworker/0:3-1912 [000] … 70.981401: rtcpu_nvcsi_intr: tstamp:2677377256 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x10000040
kworker/0:3-1912 [000] … 70.981401: rtcpu_nvcsi_intr: tstamp:2677377256 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00001040
kworker/0:3-1912 [000] … 70.981402: rtcpu_nvcsi_intr: tstamp:2677378184 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x10000040
kworker/0:3-1912 [000] … 70.981402: rtcpu_nvcsi_intr: tstamp:2677378184 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00001040
kworker/0:3-1912 [000] … 70.981402: rtcpu_nvcsi_intr: tstamp:2677378726 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x10000040
kworker/0:3-1912 [000] … 70.981402: rtcpu_nvcsi_intr: tstamp:2677378726 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00001040
kworker/0:3-1912 [000] … 70.981402: rtcpu_nvcsi_intr: tstamp:2677380011 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x10000040
kworker/0:3-1912 [000] … 70.981402: rtcpu_nvcsi_intr: tstamp:2677380011 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00001040
kworker/0:3-1912 [000] … 70.981402: rtcpu_nvcsi_intr: tstamp:2677381475 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x10000040
kworker/0:3-1912 [000] … 70.981403: rtcpu_nvcsi_intr: tstamp:2677381475 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00001040
kworker/0:3-1912 [000] … 70.981403: rtcpu_nvcsi_intr: tstamp:2677382935 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x10000040
kworker/0:3-1912 [000] … 70.981403: rtcpu_nvcsi_intr: tstamp:2677382935 class:CORRECTABLE_ERR type:PHY_INTR phy:0 cil:0 st:0 vc:0 status:0x00001040
kworker/0:3-1912 [000] … 70.981403: rtcpu_nvcsi_intr: tstamp:2677383477 class:GLOBAL type:PHY_INTR0 phy:0 cil:0 st:0 vc:0 status:0x10000040

the camera specification as below
mclk_khz = “24000”
dynamic_pixel_bit_depth = “8”
csi_pixel_bit_depth = “8”
mode_type = “raw”;
pixel_phase = “grey”;
pixel_t = “gray”;
dimention 1600x1300@60fps
pix_clk_hz = “250000000”;
serdes_pix_clk_hz = “833333333”;
num_csi_lanes = <12>;
max_lane_speed = <1500000>;
Command to capture raw data : v4l2-ctl -d /dev/video0 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test.raw --verbose
After observation of the waveform on the oscilloscope, it is confirmed that MIPI data is coming from the camera sensor.
The MIPI Clock rate we are getting is around 400 MHz
MIPI Data rate is 800 MHz.
can you please help me what is the possible reason for this error and what is the solution to overcome this?

Thanks

Your topic was posted in the wrong category. I am moving this to the Jetson Xavier NX category for visibility.

The trace tell start of transfer multiple bit error that could be the HW signal problem.
May need probe the MIPI signal to make sure match MIPI spec.

Thank you for your quick reply.
please refer attached MIPI Waveform.Can you check once and let us know if it is okay or not
Green Waveform: Data
yellow Waveform: Clock

Please check the timing like this.

Hi @ShaneCCC
PFA Of required waveform of P and N channel



The signal doesn’t looks like right.

umm not similar to that you shared.
Every time we are getting this waveform only. did you have any idea why this we are getting? I mean does this related to MIPI configuration or some camera register configuration mismatch.

Also one more thing we are observing is while capturing raw data using v4l2 we also get another error that i attached below.

root@xavier-desktop:/home/xavier# v4l2-ctl -d /dev/video0 --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --verbose
VIDIOC_QUERYCAP: ok
VIDIOC_S_EXT_CTRLS: ok
VIDIOC_REQBUFS: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_QUERYBUF: ok
VIDIOC_QBUF: ok
VIDIOC_STREAMON: ok
Index : 0
Type : Video Capture
Flags : mapped, error
Field : None
Sequence : 0
Length : 2080000
Bytesused: 2080000
Timestamp: 0.000000s (Monotonic, End-of-Frame)

dmesg logs
[ 75.867597] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 75.867627] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 75.867768] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 75.871032] Unable to handle kernel NULL pointer dereference at virtual address 00000010
[ 75.871202] Mem abort info:
[ 75.871255] ESR = 0x96000005
[ 75.871312] Exception class = DABT (current EL), IL = 32 bits
[ 75.871484] SET = 0, FnV = 0
[ 75.871542] EA = 0, S1PTW = 0
[ 75.871598] Data abort info:
[ 75.871651] ISV = 0, ISS = 0x00000005
[ 75.871718] CM = 0, WnR = 0
[ 75.871777] user pgtable: 4k pages, 39-bit VAs, pgd = ffffffc1abc66000
[ 75.871884] [0000000000000010] *pgd=0000000000000000, *pud=0000000000000000
[ 75.872015] Internal error: Oops: 96000005 [#1] PREEMPT SMP
[ 75.872111] Modules linked in: ov2311 bnep fuse xt_conntrack ipt_MASQUERADE nf_nat_masquerade_ipv4 nf_conntrack_netlink nfnetlink xt_addrtype iptable_filter iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack br_netfilter zram overlay userspace_alert nvgpu ip_tables x_tables
[ 75.881608] CPU: 1 PID: 8110 Comm: vi-output, ov23 Not tainted 4.9.253-tegra #12
[ 75.889294] Hardware name: NVIDIA Jetson Xavier NX Developer Kit (DT)
[ 75.895858] task: ffffffc1ebca7000 task.stack: ffffffc1a3918000
[ 75.901378] PC is at _raw_write_lock+0x30/0x58
[ 75.905839] LR is at destroy_buffer_table+0x40/0xd8
[ 75.910820] pc : [] lr : [] pstate: 20c00045
[ 75.918343] sp : ffffffc1a391bc70
[ 75.921321] x29: ffffffc1a391bc70 x28: 0000000000000000
[ 75.926572] x27: 0000000000000000 x26: 0000000000000000
[ 75.932082] x25: 0000000000000010 x24: 0000000000000098
[ 75.937859] x23: 0000000000000018 x22: ffffff8009076018
[ 75.943186] x21: 0000000000000000 x20: ffffffc1bf343f80
[ 75.948524] x19: 0000000000000010 x18: 000000000000b331
[ 75.953870] x17: 0000000000000002 x16: 0000000000000003
[ 75.959647] x15: 00000000000001cc x14: 000000000000014f
[ 75.965336] x13: 0000000000000279 x12: 0000000000000400
[ 75.971276] x11: 0000000000000400 x10: 0000000000000000
[ 75.976962] x9 : ffffffc1a391ba80 x8 : 0000000000000000
[ 75.982734] x7 : ffffffc1bf29f640 x6 : ffffffc1e8bb5581
[ 75.987998] x5 : ffffff800852d8b4 x4 : ffffffbf07a2ed50
[ 75.993334] x3 : 0000000000000000 x2 : ffffffc1e8bb5580
[ 75.998673] x1 : 0000000000000000 x0 : 0000000080000000

[ 76.005668] Process vi-output, ov23 (pid: 8110, stack limit = 0xffffffc1a3918000)
[ 76.012581] Call trace:
[ 76.014955] [] _raw_write_lock+0x30/0x58
[ 76.020287] [] destroy_buffer_table+0x40/0xd8
[ 76.025880] [] vi_capture_shutdown+0xd4/0x130
[ 76.031220] [] vi_channel_close_ex+0x34/0x88
[ 76.036821] [] vi5_channel_error_recover+0x48/0x1c8
[ 76.043032] [] tegra_channel_error_recover+0x58/0x90
[ 76.048899] [] tegra_channel_kthread_capture_dequeue+0xf8/0x1c0
[ 76.055820] [] kthread+0xec/0xf0
[ 76.060708] [] ret_from_fork+0x10/0x30
[ 76.065699] —[ end trace f121228fe7801fe1 ]—
[ 76.080589] note: vi-output, ov23[8110] exited with preempt_count 1

ftrace log

 kworker/0:3-1742  [000] ....    72.218561: rtos_queue_peek_from_isr_failed: tstamp:2717375758 queue:0x0bcbbbb8
 kworker/0:3-1742  [000] ....    72.330356: rtos_queue_peek_from_isr_failed: tstamp:2720183149 queue:0x0bcbbbb8
    v4l2-ctl-8416  [000] ....    81.898105: tegra_channel_open: vi-output, ov2311 9-0060
    v4l2-ctl-8416  [000] ....    81.899642: tegra_channel_set_power: ov2311 9-0060 : 0x1
    v4l2-ctl-8416  [000] ....    81.899653: camera_common_s_power: status : 0x1
    v4l2-ctl-8416  [000] ....    81.900390: tegra_channel_set_power: 15a00000.nvcsi--1 : 0x1
    v4l2-ctl-8416  [000] ....    81.900394: csi_s_power: enable : 0x1
    v4l2-ctl-8416  [000] ....    81.906377: tegra_channel_capture_setup: vnc_id 0 W 1600 H 1300 fmt 5
    v4l2-ctl-8416  [003] ....    81.910796: tegra_channel_set_stream: enable : 0x1
    v4l2-ctl-8416  [001] ....    81.914568: tegra_channel_set_stream: 15a00000.nvcsi--1 : 0x1
    v4l2-ctl-8416  [001] ....    81.914573: csi_s_stream: enable : 0x1
    v4l2-ctl-8416  [001] ....    81.914589: tegra_channel_set_stream: ov2311 9-0060 : 0x1
 kworker/0:3-1742  [000] ....    81.946361: rtos_queue_peek_from_isr_failed: tstamp:3021020237 queue:0x0bcbbbb8
 kworker/0:3-1742  [000] ....    81.946366: rtcpu_start: tstamp:3021022101
 kworker/0:3-1742  [000] ....    81.946368: rtos_queue_send_from_isr_failed: tstamp:3021039535 queue:0x0bcb2e38
 kworker/0:3-1742  [000] ....    81.946369: rtos_queue_send_from_isr_failed: tstamp:3021039687 queue:0x0bcb76a0
 kworker/0:3-1742  [000] ....    81.946370: rtos_queue_send_from_isr_failed: tstamp:3021039836 queue:0x0bcb9220
 kworker/0:3-1742  [000] ....    81.946371: rtos_queue_send_from_isr_failed: tstamp:3021039984 queue:0x0bcb9fe0
 kworker/0:3-1742  [000] ....    81.946375: rtos_queue_send_from_isr_failed: tstamp:3021040129 queue:0x0bcbada0
 kworker/0:3-1742  [000] ....    81.946377: rtcpu_string: tstamp:3021040561 id:0x04010000 str:"Configuring VI GoS.

"
kworker/0:3-1742 [000] … 81.946409: rtcpu_string: tstamp:3021040762 id:0x04010000 str:"VM GOS[#0] addr=0xc2100000
"
kworker/0:3-1742 [000] … 81.946414: rtcpu_string: tstamp:3021041017 id:0x04010000 str:"VM GOS[#1] addr=0xc2101000
"
kworker/0:3-1742 [000] … 81.946419: rtcpu_string: tstamp:3021041261 id:0x04010000 str:"VM GOS[#2] addr=0xc2102000
"
kworker/0:3-1742 [000] … 81.946423: rtcpu_string: tstamp:3021041493 id:0x04010000 str:"VM GOS[#3] addr=0xc2103000
"
kworker/0:3-1742 [000] … 81.946427: rtcpu_string: tstamp:3021041742 id:0x04010000 str:"VM GOS[#4] addr=0xc2104000
"
kworker/0:3-1742 [000] … 81.946431: rtcpu_string: tstamp:3021041974 id:0x04010000 str:"VM GOS[#5] addr=0xc2105000
"
kworker/0:3-1742 [000] … 81.946435: rtcpu_string: tstamp:3021050767 id:0x04010000 str:“vi5_hwinit: firmware CL2018101701 protocol vers”
kworker/0:3-1742 [000] … 81.946436: rtcpu_string: tstamp:3021050885 id:0x04010000 str:"on 2.2
"
kworker/0:3-1742 [000] … 81.946440: rtos_queue_send_from_isr_failed: tstamp:3021067585 queue:0x0bcb2e38
kworker/0:3-1742 [000] … 81.946441: rtos_queue_send_from_isr_failed: tstamp:3021067755 queue:0x0bcb76a0
kworker/0:3-1742 [000] … 81.946442: rtos_queue_send_from_isr_failed: tstamp:3021067909 queue:0x0bcb9220
kworker/0:3-1742 [000] … 81.946443: rtos_queue_send_from_isr_failed: tstamp:3021068056 queue:0x0bcb9fe0
kworker/0:3-1742 [000] … 81.946443: rtos_queue_send_from_isr_failed: tstamp:3021068202 queue:0x0bcbada0
kworker/0:3-1742 [000] … 81.946444: rtcpu_string: tstamp:3021069137 id:0x04010000 str:"VI GOS[#0] set to VM GOS[4] base 0xc2104000
"
kworker/0:3-1742 [000] … 81.946448: rtos_queue_send_from_isr_failed: tstamp:3021190185 queue:0x0bcb2e38
kworker/0:3-1742 [000] … 81.946449: rtos_queue_send_from_isr_failed: tstamp:3021190334 queue:0x0bcb76a0
kworker/0:3-1742 [000] … 81.946450: rtos_queue_send_from_isr_failed: tstamp:3021190491 queue:0x0bcb9220
kworker/0:3-1742 [000] … 81.946451: rtos_queue_send_from_isr_failed: tstamp:3021190636 queue:0x0bcb9fe0
kworker/0:3-1742 [000] … 81.946451: rtos_queue_send_from_isr_failed: tstamp:3021190781 queue:0x0bcbada0
kworker/0:3-1742 [000] … 81.946472: rtcpu_vinotify_event: tstamp:3021556697 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:2184973504 data:0x10000000
kworker/0:3-1742 [000] … 81.946473: rtcpu_vinotify_event: tstamp:3021556858 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:2184981632 data:0x31000001
kworker/0:3-1742 [000] … 81.946474: rtcpu_vinotify_event: tstamp:3021557020 tag:RESERVED_19 channel:0x23 frame:0 vi_tstamp:2184983840 data:0x07020001
kworker/0:3-1742 [000] … 81.946475: rtcpu_vinotify_event: tstamp:3021557155 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:2185017184 data:0x10000000
kworker/0:3-1742 [000] … 81.946475: rtcpu_vinotify_event: tstamp:3021557312 tag:RESERVED_18 channel:0x23 frame:0 vi_tstamp:2185025440 data:0x31000002
kworker/0:3-1742 [000] … 82.114511: rtos_queue_peek_from_isr_failed: tstamp:3026020601 queue:0x0bcbbbb8
kworker/0:3-1742 [000] … 82.229488: rtos_queue_peek_from_isr_failed: tstamp:3031020601 queue:0x0bcbbbb8

Notes: we’ve also seen mipi waveform in oscilloscope if we are getting this error.

The MIPI output was control by the sensor. Suppose should be able configure by the sensor REG.
Please consult with sensor vendor to confirm the settings.

Hi Team,
after adding ov2311 camera compatibility(that I’m using currently) in the default camera dtsi file( i.e. imx219) provide in SDK, I’m able to capture MIPI data with the same camera configuration that we use earlier.
Thank you NVIDIA Team for your quick support. really appreciated

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