Hello,
I am integrating a third party ISP and Camera Sensor on i.MX8M Mini EVK over MIPI-CSI. I have integrated a driver into Yocto L5.4.47-2.2.0 and I am observing data and clock on the MIPI lines from ISP+Sensor. But I am unable to capture any images on i.MX8MM side.
Gstreamer command used to capture the image:
gst-launch-1.0 -v v4l2src device="/dev/video0" num-buffers=1 ! 'video/x-raw, width=(int)640, height=(int)480, format=(string)UYVY' ! jpegenc ! filesink location=/home/root/test.jpg
The gstreamer waits for capturing an image but nothing is recevied. When I press Ctrl+C and check the file size, it comes out zero i.e there is no data in the captured image. Also, gstreamer does not give any errors in the log.
The ISP+Sensor combo transmits image in YUV422 format and I am seeing MIPI CSI interrupts in /proc/interrupts.
root@imx8mmevk:~# cat /proc/interrupts | grep -i mipi_csi
57: 147901 0 0 0 GICv3 49 Level 32e30000.mipi_csi
Q1. To debug this, I want to dump the low level framebuffer data from MIPI-CSI receiver driver so that I can confirm whether the MIPI CSI reciever driver is capturing the data or not.
Is this possible? If yes, then how do I dump the framebuffer data from driver level closest to MIPI HW?
Q2. I also tried to read the MIPI CSI registers 0x32E3_0004 to 0x32E3_011C using devmem utlity, but the system hangs when I try to read these registers.
I am able to read other registers like 'SNVS_HP Version ID Register 1' successfully using this utlity.
Is there any other way to read the MIPI CSI registers to find out its status?
Q3. Is there is any other way to confirm if the frames are correctly captured by the MIPI-CSI interface? Any further debug points to help will be very much appreciated.
Regards,
Naman
已解决! 转到解答。
Hi @joanxie ,
I apologise for the late response.
I got the CSI capturing working by using 2-lanes configuration. The issue seems to be with 4-lane configuration only. When I am using 4-lanes, I am unable to capture anything. For this 4-lane issue, I have raised another query.
I got UYVY working by adding the format support in the core drivers by taking reference from another IMX8MM based system which has same ISP+Sensor support which I am trying to integrate.
Regards,
Naman
Hi,
I encounter exactly the same issue from the original post but i can't see how you resolved it @namanthaker What did you change? By trying with 1, 2 and 4 lanes nothing can get me valid frames...
Am working on another sensor but the issue is the same: drivers recognize devices, device tree updated but gstreamer stuck on set_stream and i am forced to ctrl+C to abort it and size of my output file is 0. I wonder that it is a clock problem? data format problem? etc...? How did you resolve your case please @namanthaker ? Anyone knows the solution to this type of problem or maybe is it better to create a new post for my problem?
Thanks a lot !
Hi @jfontain88,
I had issue only while using 4-lane. When DTS and sensor were configured for 2-lane or 1-lane everything was working fine. Afterwards it was found that the problem with 4-lane was setup related i.e. problem with copper wire connection between IMX8MM EVK and sensor EVM. I disassembled the entire setup and recreated the setup with new copper wires. I also used a clean SW build with the kernel changes suggested in below query:
https://community.nxp.com/t5/i-MX-Processors/Issue-with-using-MIPI-CSI-4-Lane-on-i-MX8MM/m-p/1287968...
Could you try the 4-lane patch in the above query and check if it helps?
Regards,
Naman
it seems that imx8mm has issue about UYVY, you can refer to the patch as below:
Hi @joanxie ,
I apologise for the late response.
I got the CSI capturing working by using 2-lanes configuration. The issue seems to be with 4-lane configuration only. When I am using 4-lanes, I am unable to capture anything. For this 4-lane issue, I have raised another query.
I got UYVY working by adding the format support in the core drivers by taking reference from another IMX8MM based system which has same ISP+Sensor support which I am trying to integrate.
Regards,
Naman
did you get any wrong message? it seems doesn't support UYVY, how about testing by
"gst-launch-1.0 v4l2src device=/dev/video0 num-buffers=1 ! jpegenc ! filesink location=test.jpg" ?
what registers of you mean " 0x32E3_0004 to 0x32E3_011C"?