Hello,
SOC : Orin nx,
Camera Sensor: IMX334 ( custom board)
Issue : Clock generation
I have created below script in DT to bind the clock soure
But, While probing oscillator to CSI clk pin no output.
Should i have initialize any IO pin in DT?
Thanks,Ravi
Hello,
Thanks for visiting the NVIDIA Developer Forums.
To ensure better visibility and support, I’ve moved your post to the Jetson category where it’s more appropriate
Cheers,
Tom
Hello Tom,
Thanks. My issue is unable to generate the Mclk for the custom sensor
-
Updated the device tree with clock names and called the clock APIs with same names
Driver bind successfully. No clock error messages. Verified the clk tree, it is enabled at 24MHz. But no output on the pin
-
disabled driver & DT.trying to generate forcefully but no luck root@localhost:/home/nvidia# echo 24000000 > /sys/kernel/debug/bpmp/debug/clk/extperiph1/rate
root@localhost:/home/nvidia# echo 1 > /sys/kernel/debug/bpmp/debug/clk/extperiph1/state
-
Trying to configure by Jetson IO. Pin 5 & 6 are not listed in the existing 24-pin header
Can you help me to generate the clock on CSI connector pin number 5 (CAM_CK0) , so that i can communicate with the sensor
Do you working on devkit or customized carrier board?
Aetina Carrier board,
https://www.aetina.com/products-detail.php?i=552
SDK : Jetpack 6.2
Kernel : 5.15.148-tegra
Thanks,
@sgursal
Any suggest for this topic.
Thanks
Do you have CAM0_MCLK configured to output EXTPERIPH1_CLK?
Can you please provide the snippet of the CAM0_MCLK config in your device tree?
Helllo,
In the documentation, I have observed that the the default MCLK is extperiph1
if it required to configure, Please let me know, Where to update the EXTPERIPH1_CLK?
Thanks,
Ravi
(Attachment tegra234-p3737-camera-imx334-overlay.dts is missing)
(Attachment tegra234-p3737-0000-camera-imx334.dtsi is missing)
Helllo,
In the documentation, I have observed that the the default MCLK is extperiph1
if it required to configure, Please let me know, Where to update the EXTPERIPH1_CLK?
(attachments)
tegra234-p3737-.zip (4.46 KB)
You may check the MB1 dts.
extperiph1_clk_pp0 {
335 nvidia,pins = "extperiph1_clk_pp0";
336 nvidia,function = "extperiph1";
337 nvidia,pull = <TEGRA_PIN_PULL_NONE>;
338 nvidia,tristate = <TEGRA_PIN_DISABLE>;
339 nvidia,enable-input = <TEGRA_PIN_DISABLE>;
340 nvidia,lpdr = <TEGRA_PIN_DISABLE>;
341 };
Hello,
Thankyou for message with steps to generate clock. I will try
I have used external oscillator 24MHz. I am able to communicate with the sensor now.
I would like to understand GMSL3 communications, Can you help with any GMSL2/3 reference designs?
Our proposed design as below, We are planning to use GMSL3 in this case
Also, After external clock applied and tested streaming with V4L2ctl and observed timestamp 0. I have attached kernel messages
v4l2-ctl --verbose --device=/dev/video1 --set-fmt-video=width=720,height=720,pixelformat=YUYV --stream-mmap --stream-count=200
VIDIOC_QUERYCAP: ok
VIDIOC_G_FMT: ok
The pixelformat ‘YUYV’ is invalid
VIDIOC_REQBUFS returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_STREAMON returned 0 (Success)
cap dqbuf: 0 seq: 0 bytesused: 16588800 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 0 bytesused: 16588800 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 1 seq: 1 bytesused: 16588800 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 2 seq: 2 bytesused: 16588800 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 3 seq: 3 bytesused: 16588800 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 0 bytesused: 16588800 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
cap dqbuf: 0 seq: 0 bytesused: 16588800 ts: 0.000000 (error, ts-monotonic, ts-src-eof)
(attachments)
streamng.txt (92.6 KB)
Looks like capture failed from the sensor.
Get the trace log to check.
I have attahced the debug log here,
root@localhost:/sys/kernel/debug/bpmp/debug# cat /sys/kernel/debug/tracing/trace
tracer: nop
(attachments)
root@localhostsyskerneldebugbpmpdeb.txt (2.35 KB)
The log show didn’t receive any data from the sensor.
You may need to confirm the port-index/bus-width with you HW design. And probe the sensor output signal.
Hello ,
Based on the above conversation, I have two observations
-
I have modified port-index = <0> for cam0. Observed the attached (stream_911_1.txt) messages.
Boosted the clocks for debug, the error message is as below,
kworker/4:1-61 [004] … 471.312357: rtcpu_nvcsi_intr: tstamp:15473160900 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/4:1-61 [004] … 471.312358: rtcpu_nvcsi_intr: tstamp:15473160900 class:CORRECTABLE_ERR type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
kworker/4:1-61 [004] … 471.312358: rtcpu_nvcsi_intr: tstamp:15473161450 class:GLOBAL type:STREAM_VC phy:0 cil:0 st:0 vc:0 status:0x00000004
Observed different messages compared to the previous report. could you please help to understand the errors
-
Regarding the clock “extperiph1”, able to see the clock signal on CSI_MCLK csi pin. But it is a discontinuous.
Set the parameter in DT as discontinuous_clk = “no”; but no continuous signal.
Can i connect the discontinuous clock to camera? is there any issues?
Thanks
Ravi,
(attachments)
stream_911_1.txt (11.5 MB)
Now NVCSI receive data from the sensor but short frame error could be nvcsi/vi clocks problem.
Boost the clocks to try.
By the way the continuous/none-continuous clocks is control by the sensor instead of jetson.
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
echo 1 > /sys/kernel/debug/bpmp/debug/clk/emc/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
cat /sys/kernel/debug/bpmp/debug/clk/emc/max_rate | tee /sys/kernel/debug/bpmp/debug/clk/emc/rate
Hello,
After clock boost, Attached the video trace messages
stream_1111.txt
Sorry! it was large file. copied here.
tracer: nop