Diagnosing CSI packet errors

Hi, I am working on testing out a MIPI CSI-2 camera connected to Jetson Xavier AGX dev kit running Jetson Linux 35.6.1. Using my camera driver I am able to configure the camera sensor modes and start/stop streaming via I2C register writes. However, the Jetson is unable to successfully process the incoming frames.

We have tried boosting the clocks on the Jetson and tracing the streaming events:

sudo su
echo 1 > /sys/kernel/debug/bpmp/debug/clk/vi/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/isp/mrq_rate_locked
echo 1 > /sys/kernel/debug/bpmp/debug/clk/nvcsi/mrq_rate_locked
cat /sys/kernel/debug/bpmp/debug/clk/vi/max_rate |tee /sys/kernel/debug/bpmp/debug/clk/vi/rate
cat /sys/kernel/debug/bpmp/debug/clk/isp/max_rate | tee  /sys/kernel/debug/bpmp/debug/clk/isp/rate
cat /sys/kernel/debug/bpmp/debug/clk/nvcsi/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/nvcsi/rate

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

trace.log (911.6 KB)

Looking at the trace log, it seems like Start of Frame and End of Frame short packets are successfully processed, but long packets are not (CHANSEL_SHORT_FRAME data:0x0000200001000000, where I believe bit 24 in the data signifies CAPTURE_STATUS_NOTIFY_BIT_CSIMUX_STREAM_FIFO_BADPKT and bit 45 signifies CAPTURE_STATUS_NOTIFY_BIT_CHANSEL_FAULT_FE). Is this interpretation correct?

To try and determine why the packets were at fault I wanted to read some of the NVCSI stream registers (NVCSI_STREAM_0_PH_WC_0 and NVCSI_STREAM_0_PH_DI_0). However, when I try to read an NVCSI register while streaming with sudo busybox devmem 0x15a101dc I get the return value 0xDEAD2003 and errors gets logged in the kernel log indicating a firewall error:
dmesg.log (4.8 KB)

Is there any way around these errors, so that I can read the NVCSI register values or is the some better way to troubleshoot these errors?

Have reference to below to disable the firewall.

Hi, thanks for the reply. I am not sure those linked topics are applicable in this instance. The referenced solutions appear to be specific to the Orin models and in my case I am using a Xavier AGX (35.6.1).

It is unclear to me if the Xavier even implements a firewall and if so how to disable it. Anything else I can try?

OK, suppose Xavier don’t have the firewall implement.

If there is no firewall, what could be preventing the register reads? Is there anyway to read the NVCSI registers on Jetson Xavier AGX with l4t 35.6.1?

Suppose it could be resource acquire by CSI driver.
Maybe you can read it in the csi5_fops.c

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