cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Adventurer
Adventurer
317 Views
Registered: ‎10-20-2019

mipi csi-2 rx to receive mipi signals from image sensor

I use a mipi csi-2 rx ip core to receive mipi signals from a image sensor. It behaved not as expected.

Some information about the image sensor:

Resolution:  1828×948     

Frame-rate:  30fps     

Data Type: raw 12 bit

mipi data line rate: 504Mbps

The ila files and register dump is attached.

2020-06-26_140956.png

I think there are two exceptions .

1.The Word Count should be 0xab6. But sometimes it becomes 0xa02.

 

2.The line count of per frame ( the number of tlast pulses) changes.

 

In addition, it seems that the register dump also indicates mipi csi-2 rx ip core does not work fine.

 

@karnanl 

Tags (1)
0 Kudos
7 Replies
Highlighted
Xilinx Employee
Xilinx Employee
294 Views
Registered: ‎03-30-2016

Hello @xxwang 

1. Both XCI files are created in Vivado 2019.1. Is there any good reason for using back previous Vivado version ?
   I though you are using 2019.2+AR#73100 patch ?

2. From your register dump I can see many error flags are asserted.
   It means that MIPI CSI-2 RX IP does not receive input signal correctly.
   RX_ISR_asserted.png
   In your previous usecase (C), MIPI CSI-2 RX did not show any error.
   What is the different between case (C) and case(D) ?
   Is "Image-Sensor B" and "Image-Sensor C" a different sensor ? or the same sensor with different setting ?

   WANG_CASE_D.png

Thanks!
Leo

0 Kudos
Highlighted
Adventurer
Adventurer
233 Views
Registered: ‎10-20-2019

Hello, @karnanl 

1. Hmm, I just modified the original project in  2019.1.  I can not modify the clock after I update the project in vivado 2019.2. I will create new project in vivado 2019.2 and have a test.

2. "Image-Sensor B" and "Image-Sensor C" are the same image sensor with different settings.

In case C, the image sensor is configured by the ECU and I can not know the detailed configuration. The image sensor worked fine with ECU and I can observed video from a tool connected to ECU.

In case D, The image sensor  is connected to a device and I can know its detailed configuration. The image sensor worked fine with the device and I  can observed video from the device.

2020-06-27_222152.png

Best Regards!

0 Kudos
Highlighted
Adventurer
Adventurer
166 Views
Registered: ‎10-20-2019

Hello, @karnanl 

I create a new project in vivado2019.2+AR#73100. The results seem to be same. The ila files and register dump is attached.

Best Regards!

 

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
147 Views
Registered: ‎03-30-2016

Hello @xxwang 

I confirmed the register dump (registerdump.txt) , and found that Interrupt Status Register has exactly the same value.
Your MIPI CSI-2 RX still reported : ECC 2-bit error, ECC 1-bit error, and CRC error
WANG_REG_DUMP_ISR_asserted.png


When MIPI CSI-2 RX reported 2bit ECC error, current HS packet will not be processed. (Line data will lost )
I can see from ILA waveform that sometimes, 1 or 2 packets are lost. See below :

2lines_are_lost.png

When MIPI CSI-2 RX reported : ECC 2-bit error, ECC 1-bit error, and CRC error, it indicate MIPI D-PHY RX does not receive input signal from image sensor correctly.
Previously MIPI CSI-2 RX IP worked on your board with 784Mbps and 516Mbps without any issue, so I don't think this is a signal integrity issue.
Rather, I think there is a possibility that actual image sensor output has a faster line-rate than MIPI CSI-2 RX IP configured line-rate.
Wang_cases_comparison.png

1. Would you able to increase MIPI CSI-2 RX line-rate setting ( for example 516 or 520Mbps ), to see if "ECC 2-bit error, ECC 1-bit error, and CRC error" are still reported ?

2. Would you able to find the difference between image sensor setting set on case (C) and case (D) ?
   # I am suspecting the sensor setting is not correct in case (D),

3. Do you have a MIPI D-PHY analyzer to double check Image sensor output spec, to check if your image sensor setting on case (D) is correct ?

Thanks
Leo

0 Kudos
Highlighted
Adventurer
Adventurer
133 Views
Registered: ‎10-20-2019

Hello, @karnanl 

1.I have set line rate as 520Mbps  and 600Mbps, errors are still reported.

2.In case C, the image sensor is configured by the ECU and I can not know the detailed configuration. The image sensor worked fine with ECU and I can observed video from a tool connected to ECU.

In case D, The image sensor  is connected to a device and I can know its detailed configuration. The image sensor worked fine with the device and I  can observed video from the device.

3. The device can analyze the mipi signal and the image sensor worked fine with the device and I  can observed video from the device. So my image sensor setting on case (D) is correct.

Wang_cases_comparison.png 

Best Regards!

0 Kudos
Highlighted
Adventurer
Adventurer
124 Views
Registered: ‎10-20-2019

Hello, @karnanl 

Why is there those errors? Did the mipi csi-2 rx ip core work wrong ? Or is there someting wrong with the mipi signal transmitted?

Look forward to your replay.

Best Regards!

0 Kudos
Xilinx Employee
Xilinx Employee
104 Views
Registered: ‎03-30-2016

Hello @

>Why is there those errors? Did the mipi csi-2 rx ip core work wrong ? Or is there someting wrong with the mipi signal transmitted?

Right now, I do not know. I am suspecting there is something wrong with the MIPI input signal from image sensor.


Would you be able to share the following data with us (I hope you have an access to oscilloscopes in your lab ).
1. Please capture one clock lane and one data lane using oscilloscope.
    Please observe during (a) and (b) period , check if all Global Operation timing parameter specs are adhered correctly.
        (a) HS->LP transition
        (b) LP->HS transition
Oscilloscope_capture_for_clock_data_lane.png


2. MIPI D-PHY spec defines Data-Clock timing relation.
    At RX pins Clock to Data setup/hold should be larger that 0.15UI.
    MIPI_D-PHY_CLOCK_LANE_SETUP_HOLD.png
   Please ensure if all data lanes following this requirement. (setup/hold is more than 0.15UI)
   If your system does not met this requirement (for example if Clock and data are toggling at the same timing ), you may need to adjust clock line timing inside MIPI CSI-2 RX IP.
   2 alternatives work-around :
   (a) Please set "Calibration Mode" as Auto in the GUI.
   (b) Please set "Calibration Mode" as Fixed (IDELAY TAP VALUE 1, 9, 17, 23) in the GUI.

        Calibration_MODE.png
Please let me know your observation result. Thank you.


Kind regards
Leo

0 Kudos