1 Reply Latest reply on Mar 19, 2020 9:01 PM by RashiV_61

    Help CX3 + OV4689 MIPI-CSI2 RAW10

    AvOm_4629506

      Good Day!

      OV4689 sensor + your CX3 chip + libraries 1.3.4. I work on Linux.

      Sensor:

      /* EXTCLK 24 MHz

      * SCLK 120 MHz

      * MIPI_CLK 150 MHz

      * MIPI_PCLK 30 MHz

      * MIPI lane 4

      * cropping 2688*1520 -> 1280*960 | binning 2*2 = 640*480

      * fps 60

      * RAW10

      */

      CX3

      /*

      * PLL_CLK = 152

      * CSI RX LP<->HS = 38

      * PCLK = 38

      * GPIF 16bit

      */

      CyU3PMipicsiCfg_t cfgMIPI_640_480_60_NoMclk = {

      CY_U3P_CSI_DF_RAW10,

      4, //num lane

      0x1, //PLL_PRD

      27, //PLL_FBD

      CY_U3P_CSI_PLL_FRS_125_250M, //PLL_FRS

      CY_U3P_CSI_PLL_CLK_DIV_4, //csiRxClkDiv

      CY_U3P_CSI_PLL_CLK_DIV_4, //parClkDiv

      0, //mClkCtl

      CY_U3P_CSI_PLL_CLK_DIV_4, //mClkRefDiv

      640, //640

      0

      };

      I use a low speed MIPI to watch the oscilloscope what is happening there ( it is unrealistic to parse such a number of packets, but when it is nice to see that it is alive:) )

      When I pass a static image(without MIPI) everything works.

      Problem:

      1.Hangs, I suspect that when calling CyU3PDmaMultiChannelGetBuffer(chHandle, &Dma Buffer, CYU3P_NO_WAIT); (but this is not accurate). 

      The DMA runs several times (usually 2 or 3) on the full packet(CY_FX_VS_STREAM_BUF_SIZE (12800) CY_FX_VS_STREAM_BUF_COUNT (5)) and the processor freezes. 

      I use A mini 500 MS restart timer. When I play with the CyU3PMipicsiSetPhyTimeDelay settings, it happens that I receive packets of not full length of about 1400bytes and then for some reason there are no freezes , but a bunch of errors on MIPI. And when you configure everything correctly(as I think), the processor freezes(after several packets) and even the timer does not help.

      what can this be related to ?

      2. GPIF sometimes throws out undescribed States 131 and 132 ( CX3_INVALID_GPIF_STATE (257))

      what do these States mean ??

      3. CyU3PMipicsiSetPhyTimeDelay  - what values is thsSettleDelay set in ns or CSI Link LP<->HS CLK