2 Replies Latest reply on Mar 7, 2019 5:30 PM by AkCh_1378701

    CX3, generating MCLK freq to a sensor

    AkCh_1378701

      Hi sir,

       

      Is there any sample code available for generating MCLK freq to a sensor?

       

       

      i understood that MCLK just for test, and will not use that for mass production.

       

       

      thank you

        • 1. Re: CX3, generating MCLK freq to a sensor
          abhinavg_21

          Hi Akeem,

           

          There is no feature to configure MCLK from CX3 config tool but you can generate MCLK by changing generated CyU3PMipicsiCfg_t structure in mipicsi.c file. Following changes need to done:

           

          CyU3PMipicsiCfg_t cfgUvc5Mp15NoMclk =  {

              CY_U3P_CSI_DF_YUV422_8_2,

              2,

              1,

              64,

              CY_U3P_CSI_PLL_FRS_500_1000M,

              CY_U3P_CSI_PLL_CLK_DIV_8,

              CY_U3P_CSI_PLL_CLK_DIV_8,

              0xFFFF,            // Change this from zero to non zero value  MSB act as High counter & LSB act as Low counter. Set Duty Cycle using it.

              CY_U3P_CSI_PLL_CLK_DIV_8, /// Set the MCLK frequency using this divider value.

              2592,

              0x01

          };

           

          Take any CX3 default example make above 2 changes in the mipicsicfg structure and it will generate MCLK on G3 pin of CX3.

           

          Thanks & Regards

          Abhinav Garg

          • 2. Re: CX3, generating MCLK freq to a sensor
            AkCh_1378701

            Really nice!

             

            it works.. super cool!