4 Replies Latest reply on Jul 18, 2018 12:15 AM by user_2884081

    CX3 MIPI block clocks configuration


      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?



      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?