CX3 with OV2775 Raw12 Transmitting but having problems with two vertical bars in the image

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
napac_2439691
Level 1
Level 1

I have an OV2775 Sensor with 1928x1088 RAW12 30 fps Configuration. According to the script the Horizontal Blanking is 1622px and Vertical Blanking 38 px, PCLK 75MHz The MIPI CLK Period is 125 Mhz, THS Prepare 48ns and THS Zero 69 ns. I am using this configuration in the CX3:

        CY_U3P_CSI_DF_RAW12,  /* CyU3PMipicsiDataFormat_t dataFormat */

        4,                          /* uint8_t numDataLanes */

        2,                /* uint8_t pllPrd */

        95,            /* uint16_t pllFbd */

        CY_U3P_CSI_PLL_FRS_500_1000M, /* CyU3PMipicsiPllClkFrs_t pllFrs */

        CY_U3P_CSI_PLL_CLK_DIV_8,    /* CyU3PMipicsiPllClkDiv_t csiRxClkDiv */

        CY_U3P_CSI_PLL_CLK_DIV_8,    /* CyU3PMipicsiPllClkDiv_t parClkDiv */

        0,                        /* uint16_t mClkCtl */

        CY_U3P_CSI_PLL_CLK_DIV_2,    /* CyU3PMipicsiPllClkDiv_t mClkRefDiv */

        1928,                /* uint16_t hResolution */

        150                            /* uint16_t fifoDelay */

I have tried to change the parameters and this is the best result I have got so far. However I still get two big vertical strips in top of my image when I stream it:

pastedImage_0.png

Any help will be largely appreciated thank you!

0 Likes
1 Solution

Your MIPI Transmitter configuration is incorrect. Hence, you are seeing errors.

Can you please work on the MIPI transmitter side to fix these errors?

when you set output data as RAW12, you will receive 16 bits per clock (actual RAW12 + additional 4 bits). This additional four bits are due the data bus width of GPIF II. If you take care them on the host side, that would be fine. Otherwise, you frame size will increase.

View solution in original post

0 Likes
11 Replies
KandlaguntaR_36
Moderator
Moderator
Moderator
25 solutions authored 10 solutions authored 5 solutions authored

Please check the Troubleshooting Guide provided here: http://www.cypress.com/file/375991/download

0 Likes

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

0 Likes

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 */

};

0 Likes

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! 

0 Likes

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.

0 Likes

Hi srdr,

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

Best

Natalia

0 Likes

Hi Srdr

I changed again to the paraeters you sent me. I am confused on how to set the correct parameters in the camera, I still get the same two strip lines. According to the data I am receiving I get more data than what my width and height should give me, is it possible that i get the H/V blanking in the data as well?

Also I get access now to the GPIOS how can I route VSYNC and HSYNC to them?

Thank you in advance

0 Likes

It looks like you are receiving some extra lines from the image sensor.

Please share the image details that you want to stream. Please check with the image sensor manufacturer and get the correct settings.

0 Likes

Hi srdr

I finally was able to debug the EVM through UART, when I call the CyU3PMipicsiGetErrors function I get this errors.

pastedImage_0.png

Now I get an stable image but I get more data than what I need and now only one strip line is present. I am using the configuration parameters you suggested me above, however I am still using RAW12 data type because my script is already programmed with that data type.

0 Likes

Your MIPI Transmitter configuration is incorrect. Hence, you are seeing errors.

Can you please work on the MIPI transmitter side to fix these errors?

when you set output data as RAW12, you will receive 16 bits per clock (actual RAW12 + additional 4 bits). This additional four bits are due the data bus width of GPIF II. If you take care them on the host side, that would be fine. Otherwise, you frame size will increase.

0 Likes