I am havig an image not a blackscreen as in the troubleshooting. Unfotunately the desing of my board does not allow me to go through those tests. Are my calculations ok? I do not have a strong backgroung in Image Sensors so the calculations have been done mostly by tuning in manually the parameters. Thank you for the help you can provide me
You have set the output (parallel) format of the MIPI bridge to RAW12. Generally the CX3 MIPI configuration tool allows 16-bit and 24-bit output format for RAW12 input format.But when you select 16-bit output format, it will take it as RAW12. In this case, the CX3 MIPI converts the input serial data into parallel 12-bit format.
As we know that the GPIF II supports 8 or 16 or 24-bit fixed format. Hence, we must set the GPIF to 16-bit pr 24-bit format.
If we set GPIF II to 16-bit, there will be additional 4 bits sampled along with 12-bit actual data.
If we set GPIF II to 24-bit, there will be additional 12 bits sampled along with 12-bit actual data. Hence, please set it to 16-bit format. Ensure that the host application removes 4-bits per pixel and display the data.
If you do not want to do it (sampling 4 additional bits per pixel and removing them in the host application), you can set the output format to CY_U3P_CSI_DF_YUV422_8_1.
Please refer this thread for packing of RAW10 into 16-bit output format: Re: Streaming RAW8 or RAW10 using CX3 and relate to RAW12 format.
I have used the above mentioned sensor parameters and changed some values as per the requirement (mentioned in Bold format).
Please tune the image sensor MIPI CSI-2 transmitter to the following values.
1. MIPI CSI clock - this is the input from Image sensor to CX3 MIPI bridge - 125 Mhz
2. Data Lane - 4
3. THS-Prepare - 60 ns
4. THS Zero -110 ns
5. Frame Rate - 30 fps
6. HActive- 1928
7. HBlanking - 1622
8. VActive - 1088
9. VBlanking - 38
Once you tune to the above values, please use the following MIPI configuration parameters to configure the MIPI bridge of CX3. This is similar to yours except the FIFO delay.
Note that configuration of THS Settle Value of MIPI CSI-2 receiver is not taken care in the following MIPI configuration. For this, you have to use this API CyU3PMipicsiSetPhyTimeDelay and pass 11 in the second argument.
CyU3PMipicsiCfg_t null_RAW12_Resolution0 =
CY_U3P_CSI_DF_YUV422_8_1, /* CyU3PMipicsiDataFormat_t dataFormat */
4, /* uint8_t numDataLanes */
2, /* uint8_t pllPrd */
119, /* uint16_t pllFbd */
CY_U3P_CSI_PLL_FRS_125_250M, /* CyU3PMipicsiPllClkFrs_t pllFrs */
CY_U3P_CSI_PLL_CLK_DIV_2, /* CyU3PMipicsiPllClkDiv_t csiRxClkDiv */
CY_U3P_CSI_PLL_CLK_DIV_2, /* CyU3PMipicsiPllClkDiv_t parClkDiv */
0, /* uint16_t mClkCtl */
CY_U3P_CSI_PLL_CLK_DIV_2, /* CyU3PMipicsiPllClkDiv_t mClkRefDiv */
1928, /* uint16_t hResolution */
300 /* uint16_t fifoDelay */
i have already setted the GPIF II to 16 bits. I tried your suggested configuration but the lines go wider. Any idea on what could be causing this overflow of pixels? Thank you!
Check whether there is any additional header information providing by the image sensor apart from video data?
Please provide VSYNC and HSYNC, measure the values and share here. You told that your board does not support to measure the VSYNC and HSYNC. If yes, let me know whether there are any un-used GPIOs available. Hence, we can route HSYNC and VSYNC signals to these GPIOs and measure the VSYNC and HSYNC.
Please enable the debug prints to know the number of bytes that a frame consists of? This gives us how many number of bytes that the MIPI brigde feeding to GPIF II.
Thank you a lot! I will not be able to work in the project for a month but once I am able to, I will try to do what you suggest and update the thread
That's fine, Natalia.