HI,
let me explain the problems encountered
First of all, I am a bit confused on which drivers i need to use. I developped my own i2c driver for the sensor (based on ov5640_mipi_v2.c). For the moment, I use my own driver, mxc_mipi-csi and mx6s_capture drivers to set up communication between sensor and v4l2. But i see that other drivers exist such as mxc_mipi_csi2_yav or mxc_v4l2_capture...
I updated the dts files to add my devices and i added the remote point connections and mxc_mipi_csi successfully recognize my device when i look at "dmesg".
Then i try to get image with gstreamer but the pipeline get stucked on PLAYING mode and the /dev/video0 seems to send no frames... The oscilloscope shows me that csi2 is transmitted to the IMX8MM but it seems that nothing happen when i try to get those frames.
Here is my problem! I don't know where does the problem comes from. 4 lanes config? clk configuration of csi-2 d-phy? Have you any documentation about csi-2 camera porting/tutorial/exemple? I checked a lot of other topics before but nothing that helped me for this problem!
Thanks a lot!
Solved! Go to Solution.
If anyone have the same problem: here is the solution i found!
The problem was coming from the bandwidth I was using. I was trying to transfer camera flow 1824*940, 60fps on only 2 lanes at 400Mbps. I t was too much data at very low datarate. When I set datarate from 400Mbps to 1600Mbps, everything worked fine!
Hope this will help some of you
If anyone have the same problem: here is the solution i found!
The problem was coming from the bandwidth I was using. I was trying to transfer camera flow 1824*940, 60fps on only 2 lanes at 400Mbps. I t was too much data at very low datarate. When I set datarate from 400Mbps to 1600Mbps, everything worked fine!
Hope this will help some of you
(Sorry for repost, something failed)
Hi Jean
for drivers one can look at sect.6.1.8 Source Code Structure, sect.6.5 Video for Linux 2 (V4L2)
gstreamer examples in https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/i-MX-8-GStreamer-User-Guide/ta-p/1098942
Also may be useful to check HSSETTLE parameter as described in
Best regards
igor
Thanks a lot! I am a bit confused about some settings... The output is YUV uncompressed format, 1824x940 at 60fps. I can program the CSI-2 settings such as number of lanes working (1 to 4) and datarate on each lane (400Mbps to 1600Mbps).
Everything works fine for the moment: my own driver (based on ov5640-mipi-v2) recognize well the sensor, mxc-mipi-csi works well with mipi-csi imx8mm's interface and mx6s_capture with the csi-bridge (don't know if this one is needed but i activated it anyway:
[ .... ] mx6s-csi 32e20000.csi1_bridge: initialiasing
[ .... ] mxc_mipi-csi 32e30000.mipi_cs: mipi csi v4l2 device registered
[ .... ] CSI: Registered sensor subdevice: mxc_mipi-csi.0
[ .... ] mxc_mipi-csi 32e30000.mipi_cs: lanes: 2, hs-settle: 17, clk_settle: 0, wclk: 1, freq: 333000000
[ .... ] mxc_mipi-csi 32e30000.mipi_cs: Registered sensor subdevice: ov10650 1-0024
[ .... ] ov10650 1-0024: Camera is found
When i try to get frames with gstreamer (through v4l2), the debug interface of mxc-mipi-csi get me some errors (here on a test with 400Mbps, 2 lanes):
Command: gst-launch-1.0 v4l2src num-buffers=1 ! video/x-raw ! jpegenc ! filesink location=test.jpg
Output: Setting pipeline to PAUSED ...
Pipeline is live and noes not need PREROLL ...
Setting pipeline to PLAYING ...
[ .... ] ov10650 1-0024: set-stream: enabled <- stuck here and am forced to abort with ctrl+c
^C handling interrupt
[ .... ] mxc_mipi-csi.0: Frame End events: 0
[ .... ] mxc_mipi-csi.0: Frame Start events: 664
[ .... ] mxc_mipi-csi.0: Non-image data after odd frame events: 0
...
[ .... ] mxc_mipi-csi.0: FIFO Overflow Error events: 0
[ .... ] mxc_mipi-csi.0: Lost Frame End Error events: 664
[ .... ] mxc_mipi-csi.0: Lost Frame Start Error events: 0
Setting pipeline to NULL ...
Freeing pipeline ...
Q1: On the device tree there is so many things that I don't understand regarding clocks and i would appreciate some help about it
Q2: The "real" question would be: Regarding one configuration (number-of-lanes + Datarate of the lane), which settings do I need to update and where do I update it? For the number of lane it is ok for me but not for the datarate.
Q3: Do you have any solution for the Lost Frame Ends errors debugged my the mipi-csi driver?