6 Replies Latest reply on Jun 26, 2018 12:32 AM by andresgalu_2884081

    How to configure MIPI clocks

    andresgalu_2884081

      I have been working with CX3 to implement a USB camera, and I have the Denebola kit to try my modifications. These are my previous posts: #1 and #2.

       

      The problem right now is to achieve the correct MIPI configuration for everything to work. The problem is, I don't have enough information to change the settings.

      I am trying to work with a Sony IMX219PQ, with these parameters:

      • MIPI CSI clock = 1368 MHz
      • THS prepare = 47
      • THS zero = 87
      • Hblanking = 1528
      • Vblanking = 683
      • REFCLK = 19.2 MHz

      Since these values lead to impossible ranges, I have modified them: THS zero = 100, Hblanking = 200, Vblanking = 200.

      But the CX3 Receiver Configuration application always shows an error:

      Since the values are in the right ranges, I don't know why am I getting this error.

       

      What is the use of the values on the left side (MIPI CSI2 Inputs From Image Sensor) if the ones that are being used are obtained from the right section (CX3 MIPI Interface Configuration)?

      Why does that error shows up?

      Why does a larger Hblanking value leads to a larger Output Pixel Clock min value?

        • 1. Re: How to configure MIPI clocks
          yyca

          Hi Andrés,

           

          Please refer to my reply below.

           

          1. Since the values are in the right ranges, I don't know why am I getting this error.

          >> Which version of SDK you are using? I check your parameters on my side. It has no error.

          BaiduShurufa_2018-6-22_9-50-37.bmp

          2.  What is the use of the values on the left side (MIPI CSI2 Inputs From Image Sensor) if the ones that are being used are obtained from the right section (CX3 MIPI Interface Configuration)?

          >> Yes, we use inputs on the left panel to calculate/check the paramters( the range) on the right panel. You may refer to CX3 TRM to know the detailed information of these clock values.

           

          3. Why does that error shows up?

          >> Please let me know the version of the SDK. As you could see that we get different results.

          • 2. Re: How to configure MIPI clocks
            andresgalu_2884081

            Thanks for your answer.

             

            I am using SDK version 1.3.4, I updated it right now.

             

            The configuration I sent last post wasn't possible, since there are certain minimum values for frame and line blanking. Therefore, I tried this new configuration. I even slowed the FPS to 15 so there wouldn't be any problem.

            The thing is, the Output Pixel Clock minimum value is above the maximum value. This is because the V blanking value is high. This parameter controls the FPS of the camera, so if it is low, the FPS would be high, and the result would be the same. Does this means that CX3 can't read data from this camera?

             

            I have thought of reducing the camera clock frequency, is that the only possible solution?

            I would like to change the camera settings as little as possible.

             

            EDIT: Update, I see that lowering the CSI clock value does not reduce the minimum value of the Output Pixel Clock.

            I don't see a solution. Help would be appreciated.

            • 3. Re: How to configure MIPI clocks
              andresgalu_2884081

              I had to reduce the FPS to 15 and the camera clock frequency to half its value. Now the total amount of bytes per frame is near the objective, but still the video can't be streamed.

              HSYNC, VSYNC and PCLK signals look good, what am I missing?

              • 4. Re: How to configure MIPI clocks
                andresgalu_2884081

                Please, your help would be appreciated in this project. Answer my questions, please.

                • 5. Re: How to configure MIPI clocks
                  yyca

                  Hi Andrés,

                   

                  I spent some time updating my SDK to 1.3.4.

                  Back to your question, I checked the new value again. If you needs to stream video at FPS=15, you could use the data below.

                  BaiduShurufa_2018-6-26_14-19-52.bmp

                  You could keep CSI clock as the orignal one, but the V_blanking should be smaller.

                  You said that you checked FV/LV/PCLK and they were fine. Could you please upload the waveform screeshots?

                  We need to know the frequency of PCLK and the H_active time, H_blanking time and V_active and V_blanking time from these screenshots.

                  • 6. Re: How to configure MIPI clocks
                    andresgalu_2884081

                    Thanks for your answer.

                    I tried the configuration you sent, but it is still not working.

                     

                    The only way I have to stream video is the following:

                    • Camera set to RAW10 and 1080p
                    • MIPI set to RAW8 and hResolution=2400 (1920*5/4)
                    • GPIF bus set to 8 bits

                     

                    I still don't know why when I set everything to work with RAW10, it doesn't send enough bytes. RAW10 configuration:

                    • Camera set to RAW10 and 1080p
                    • MIPI set to RAW10 and hResolution 1920
                    • GPIF bus set to 16 bits