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

USB superspeed peripherals Forum Discussions

user_2884081
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted

I have the CX3 device on a Denebola board and I'm trying to make a Sony IMX219 work.

I got it working in VGA with this configuration:

CyU3PMipicsiCfg_t cfgUvcVga30NoMclk =  {

     CY_U3P_CSI_DF_RAW10,        /* dataFormat   */

     2,                            /* numDataLanes */

     1,                          /* pllPrd       */

     63,                            /* pllFbd       */

     CY_U3P_CSI_PLL_FRS_500_1000M,   /* pllFrs      */

     CY_U3P_CSI_PLL_CLK_DIV_8,      /* csiRxClkDiv  */

     CY_U3P_CSI_PLL_CLK_DIV_8,      /* parClkDiv    */

     0x00,                          /* mclkCtl      */

     CY_U3P_CSI_PLL_CLK_DIV_8,      /* mClkRefDiv   */

     640,                          /* hResolution  */

     0x0A                          /* fifoDelay    */

};

The only "problem" is that it only works when Probe and UVC are configured for 640x482, instead of 640x480, and it sends 2 black lines to host PC, but I can deal with that.

The GPIF bus is 16 bits, and the camera clock has been increased to the maximum value possible that makes it work.

With this configuration, I can easily receive ~110 fps.

Since it works with different camera clocks configurations, but the same MIPI block parameters, I guessed that the MIPI configuration shown above should work for every other resolution. After all, if I don't modify the camera clocks, the bit rate will be the same, and the CX3 MIPI block wouldn't have a problem reading it.

Therefore I changed the camera configuration to work in 720p, with the same clock configuration. And it is not working.

What do I need to change? Why do I need to change something?

I have a byte count to see how many bytes does the DMA send to the USB, and I am getting 0x1CC0E8, when I should be getting 0x1C2000.

Reading in the community, I found that CX3 firmware must be modified to work with MIPI continuous clock. Below are my MIPI signals: yellow is the clock and blue is data lane 0. Is this clock continuous?

RIGOL Print Screen27-06-2018 10_23_51,058.bmp

I tried doing this when a SET_CUR request arrives from host:

status = CyU3PMipicsiReset(CY_U3P_CSI_HARD_RST);

status =  CyU3PMipicsiInit();

status = CyU3PMipicsiSetIntfParams (&cfgUvc720p60NoMclk, CyFalse);

/* Sensor configuration */

As explained in the FAQs. But the result is still the same. Am I doing this wrong? Do I have to do this?

0 Likes
1 Solution
user_2884081
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted

SOLUTION:

Just maxed out every MIPI block parameter and modified camera clocks until working.

View solution in original post

0 Likes
4 Replies
KandlaguntaR_36
Moderator
Moderator
Moderator
100 likes received 50 likes received 25 likes received

1. You can check whether the sensor is working Continuous or Gated Mode as follows:

The clock is continuous clock mode: LP-HS transition only happen once, clock does not switch back to LP between lines or frames.

2. Regarding 640x482:

Measure the HSYNC_LOW and High; VSYNC_Low and High; and PCLK, then check whether it is meeting the requirement. i.e. 640x480

3. When you change the resolution on the Sensor side, you have to modify the MIPI configuration irrespective of clock settings of the sensor. Because the horizontal resolution is getting changed in the MIPI configuration parameters. Therefore, please get the MIPI conf. settings for 720p case from the tool and use them.

0 Likes

So the clock I am using is non-continuous since it changes between frames. Thank you.

Regarding the MIPI configuration, the tool seems to not be working correctly on my PC, since it is always giving errors, or it even does not generate all the other ".c" documents.

0 Likes

Andres,

Please provide the following parameters that you are providing to the tool.

1. CSI Clock

2. H_Active

3. H_Blank

4. V_Active

5. V_Blank

6. Frame Rate

7. Input Data

8. Output Data

Also provide the screen shots to know the errors that you are facing?

0 Likes
user_2884081
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted

SOLUTION:

Just maxed out every MIPI block parameter and modified camera clocks until working.

0 Likes