Okay so I am a bit more confused now. If look at the trace while getting RAW8 data from the camera I get also get CHANSEL errors, however I am still getting frames from the camera (images which are slightly malformed).
Here is the trace for that:
kworker/0:4-1654 [000] .... 340.837137: rtcpu_vinotify_event: tstamp:11019259503 tag:ATOMP_FE channel:0x00 frame:0 vi_tstamp:11018760588 data:0x00000000
kworker/0:4-1654 [000] .... 340.837139: rtcpu_vinotify_event: tstamp:11019259649 tag:RESERVED_19 channel:0x23 frame:0 vi_tstamp:9002975648 data:0x000203e8
kworker/0:4-1654 [000] .... 340.837139: rtcpu_vinotify_event: tstamp:11019259812 tag:RESERVED_19 channel:0x23 frame:0 vi_tstamp:9002997184 data:0x070203e9
kworker/0:4-1654 [000] .... 340.837140: rtcpu_vinotify_error: tstamp:11019450763 tag:CHANSEL_NOMATCH channel:0x04 frame:0 vi_tstamp:11019445325 data:0x00000269
kworker/0:4-1654 [000] .... 340.837146: rtos_queue_peek_from_isr_failed: tstamp:11019452373 queue:0x0bcbcf78
kworker/0:4-1654 [000] .... 340.837147: rtcpu_vinotify_event: tstamp:11019695252 tag:FS channel:0x00 frame:0 vi_tstamp:11019442115 data:0x00000012
kworker/0:4-1654 [000] .... 340.837147: rtcpu_vinotify_event: tstamp:11019695414 tag:ATOMP_FS channel:0x00 frame:0 vi_tstamp:11019442117 data:0x00000000
kworker/0:4-1654 [000] .... 340.837147: rtcpu_vinotify_event: tstamp:11019695554 tag:CHANSEL_EMBED_SOF channel:0x23 frame:0 vi_tstamp:11019442138 data:0x00000004
kworker/0:4-1654 [000] .... 340.837148: rtcpu_vinotify_event: tstamp:11019695715 tag:CHANSEL_EMBED_EOF channel:0x23 frame:0 vi_tstamp:11019442248 data:0x00010008
kworker/0:4-1654 [000] .... 340.837148: rtcpu_vinotify_event: tstamp:11019695851 tag:ATOMP_EMB_DATA_DONE channel:0x23 frame:0 vi_tstamp:11019442270 data:0x00000000
kworker/0:4-1654 [000] .... 340.837148: rtcpu_vinotify_event: tstamp:11019696009 tag:RESERVED_19 channel:0x23 frame:0 vi_tstamp:9024787808 data:0x030203e9
kworker/0:4-1654 [000] .... 340.837148: rtcpu_vinotify_event: tstamp:11019696148 tag:CHANSEL_NOMATCH channel:0x04 frame:0 vi_tstamp:11019445325 data:0x00000269
kworker/0:4-1654 [000] .... 340.837149: rtcpu_vinotify_event: tstamp:11019696305 tag:CHANSEL_PXL_SOF channel:0x23 frame:0 vi_tstamp:11019447629 data:0x00000001
When outputting in RAW16, I still get the CHANSEL errors (with code 249 instead, I am also seeing the following in dmesg:
[ 274.312147] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 128, err_data 131072
[ 276.818836] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 276.819033] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 276.819198] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 276.821005] t194-nvcsi 15a00000.nvcsi: csi5_stop_streaming: csi_pt=2, st_id=2, vc_id=0, pg_mode=0x0
[ 276.821014] t194-nvcsi 15a00000.nvcsi: csi5_stream_close: stream_id=2, csi_port=2
[ 276.821024] t194-nvcsi 15a00000.nvcsi: csi5_start_streaming: csi_pt=2, st_id=2, vc_id=0, pg_mode=0x0
[ 276.821032] t194-nvcsi 15a00000.nvcsi: csi5_stream_set_config: stream_id=2, csi_port=2
[ 276.821039] t194-nvcsi 15a00000.nvcsi: csi5_stream_open: stream_id=2, csi_port=2
[ 276.821383] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[ 276.838861] [RCE] Configuring VI GoS.
[ 276.838871] [RCE] VM GOS[#0] addr=0xc2100000
[ 276.838878] [RCE] VM GOS[#1] addr=0xc2101000
[ 276.838884] [RCE] VM GOS[#2] addr=0xc2102000
[ 276.838891] [RCE] VM GOS[#3] addr=0xc2103000
[ 276.838896] [RCE] VM GOS[#4] addr=0xc2104000
[ 276.838930] [RCE] VM GOS[#5] addr=0xc2105000
[ 276.862219] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 128, err_data 131072
[ 279.378722] tegra194-vi5 15c10000.vi: no reply from camera processor
[ 279.378890] tegra194-vi5 15c10000.vi: uncorr_err: request timed out after 2500 ms
[ 279.379069] tegra194-vi5 15c10000.vi: err_rec: attempting to reset the capture channel
[ 279.381247] t194-nvcsi 15a00000.nvcsi: csi5_stop_streaming: csi_pt=2, st_id=2, vc_id=0, pg_mode=0x0
[ 279.381256] t194-nvcsi 15a00000.nvcsi: csi5_stream_close: stream_id=2, csi_port=2
[ 279.381266] t194-nvcsi 15a00000.nvcsi: csi5_start_streaming: csi_pt=2, st_id=2, vc_id=0, pg_mode=0x0
[ 279.381273] t194-nvcsi 15a00000.nvcsi: csi5_stream_set_config: stream_id=2, csi_port=2
[ 279.381280] t194-nvcsi 15a00000.nvcsi: csi5_stream_open: stream_id=2, csi_port=2
[ 279.381636] tegra194-vi5 15c10000.vi: err_rec: successfully reset the capture channel
[ 279.412313] tegra194-vi5 15c10000.vi: corr_err: discarding frame 0, flags: 128, err_data 131072
[ 279.414812] [RCE] Configuring VI GoS.
[ 279.414856] [RCE] VM GOS[#0] addr=0xc2100000
[ 279.414863] [RCE] VM GOS[#1] addr=0xc2101000
[ 279.414880] [RCE] VM GOS[#2] addr=0xc2102000
[ 279.414886] [RCE] VM GOS[#3] addr=0xc2103000
[ 279.414892] [RCE] VM GOS[#4] addr=0xc2104000
[ 279.414905] [RCE] VM GOS[#5] addr=0xc2105000
I don’t think the camera is outputting data in an incorrect format, as I can receive frames using a Jetson Nano with the following debug settings:
echo 1 > /sys/kernel/debug/tracing/tracing_on
echo 30720 > /sys/kernel/debug/tracing/buffer_size_kb
echo 1 > /sys/kernel/debug/tracing/events/tegra_rtcpu/enable
echo 1 > /sys/kernel/debug/tracing/events/freertos/enable
echo 2 > /sys/kernel/debug/camrtc/log-level
echo 1 > /sys/kernel/debug/tracing/events/camera_common/enable
echo > /sys/kernel/debug/tracing/trace
cd /sys/kernel/debug/dynamic_debug/
echo file csi2_fops.c +p > control
echo file vi2_fops.c +p > control
and my resulting trace doesn’t show any of those errors:
vi-output, vg57-23093 [000] .... 20677.954570: csi_s_stream: enable : 0x1
vi-output, vg57-23093 [000] .... 20677.954598: tegra_channel_set_stream: vg5761 6-0010 : 0x1
vi-output, vg57-23093 [002] .... 20680.924387: tegra_channel_capture_frame: sof:20681.254560510
vi-output, vg57-23093 [001] .... 20680.941126: tegra_channel_capture_frame: sof:20681.271199378
vi-output, vg57-23093 [000] .... 20680.957642: tegra_channel_capture_frame: sof:20681.287857621
vi-output, vg57-23093 [002] .... 20680.974345: tegra_channel_capture_frame: sof:20681.304519302
v4l2-ctl-23092 [003] .... 20680.990538: tegra_channel_capture_done: mw_ack_done:20681.320422320
v4l2-ctl-23092 [003] .... 20680.990565: tegra_channel_set_stream: enable : 0x0
v4l2-ctl-23092 [003] .... 20680.990571: tegra_channel_set_stream: vg5761 6-0010 : 0x0
v4l2-ctl-23092 [000] .... 20681.112934: tegra_channel_set_stream: nvcsi--1 : 0x0
v4l2-ctl-23092 [000] .... 20681.112938: csi_s_stream: enable : 0x0
At this point I am assuming that my configuration of the NX must be wrong, but I am still unsure how.