Mipi CSI-2 camera frames lost on IMX8M Mini

cancel
Showing results for 
Search instead for 
Did you mean: 

Mipi CSI-2 camera frames lost on IMX8M Mini

77 Views
jfontain88
Contributor II

Hi everybody

am working on a new mipi csi-2 camera integration on IMX8M Mini but I am a bit confused about some settings... I have a ov10650 (with ov495 ISP) sensor which outputs me MIPI CSI-2. 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 How do I know which clock i need to set up? How can I calculate its value? Especially for mipi_clk, phy_clk, disp_axi and disp_apb ? I am attempted to set mipi_clk to the datarate of my lanes (= 400Mbps for exemple so putting 400MHz) ?

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?

Thanks a lot for your help!

0 Kudos
0 Replies