9 Replies Latest reply on Aug 19, 2019 9:36 AM by zatu_4398686

    IMX241 CX3 2592x1944 @ 30FPS issues

    ZaTu_4258396

      Hello all, I am attempting to add full functionality to our firmware for multiple available framerates and the first one I am trying to tackle is changing from 2592x1944 @ 15 FPS to 30 FPS. This seems like a simple change but I am having a hard time getting the MIPI config tool to create the necessary files. Everything I put in I cannot get the pixel clock to get to a usable value that doesnt throw an error.

       

       

      The settings that are currently functioning on the camera is 2592x1944 @ ~13.7 FPS

       

       

      This is for the 30FPS 2592x1944

       

       

      I will go into more detail on my issue but curious first if this setup is even possible with the CX3... the datasheet states that it can handle the speed and the camera can handle the output.

       

      I have also attempted to get a 1920*1080 @ 30FPS to work as well with no luck. I am not sure that I have changed the correct code in the right locations.

       

       

       

       

      1. Added new USB config descriptors to the existing USBDSC.c file that is already in our firmware build.

      2. Added config probe control

      if (CyU3PUsbGetSpeed() == CY_U3P_SUPER_SPEED)

      {

      if (FrameIndex == 2)

      {

      // Write 5Mp setting

      #ifdef SENSOR_IMX241

      status = CyU3PMipicsiSetIntfParams( (CyU3PMipicsiCfg_t *) &imx241_RAW10_Resolution1, CyFalse);

       

       

      /* Host requests for probe data of 34 bytes (UVC 1.1) or 26 Bytes (UVC 1.0). Send it over EP0. */

      if (CyU3PUsbGetSpeed() == CY_U3P_SUPER_SPEED)

      {

      if (glCurrentFrameIndex == 2)

      {

      // #error this appears to overwrite the const descriptor glProbeCtrl and we should send gl5Mp15ProbeCtrl instead of glProbeCtrl below and delete this section

      #ifdef SENSOR_IMX241

      CyU3PMemCopy( (uint8_t *) glProbeCtrl, (uint8_t *) glResolution1ProbeCtrl, ES_UVC_MAX_PROBE_SETTING);

      #endif // SENSOR_IMX241

      }

       

      I have been unsuccessful in moving forward in my tasks and just need a push in the right direction with this firmware. I feel like I am missing some key information points and just cannot find the required documentation to help me out. Please let me know if I can provide any extra information. Thank you for your help.

        • 1. Re: IMX241 CX3 2592x1944 @ 30FPS issues
          KandlaguntaR_36

          Hello,

           

          Please set the output data format as 24-bit and check the pixel lock.

           

          You may refer this KBA: Streaming RAW10 Format Input Data to 16/24-bit Output Format in CX3 MIPI CSI-2 - KBA224387

           

          Regards,

          Sridhar

          • 2. Re: IMX241 CX3 2592x1944 @ 30FPS issues
            ZaTu_4258396

            I have only changed the setting to 24-bit and adjusted a couple other variables to let them fall into acceptable values. However, the Output Pixel Clock states that there is a min of 166 with these settings. Is there something else we are missing? I am going to follow that link you sent and follow instructions to get the 1080p to work if I can. Will report on that later this afternoon.

             

             

            • 3. Re: IMX241 CX3 2592x1944 @ 30FPS issues
              KandlaguntaR_36

              There is no 166 MHz as you said. The maximum value of CSI clock is 500 MHz. You have set it as 920 MHz. Please set it less than 500 MHz.

               

              Regards,

              Sridhar

              • 4. Re: IMX241 CX3 2592x1944 @ 30FPS issues
                ZaTu_4258396

                The 166Mhz is what the red "x" next to the output pixel clock states is the minimum, which is outside the available range for the value. Also, the config states that the acceptable minimum for the CSI clock starts at 920.99 for the 2592x1944 solution. Reducing this to 450 only gives me another error stating that the clock must be higher and still gives the same errors on the output pixel clock.

                • 5. Re: IMX241 CX3 2592x1944 @ 30FPS issues
                  ZaTu_4258396

                  Is there any methods to probing the camera module/cx3 lines in order to view the timing of the data transfer to confirm the changes that I am making in the firmware? I have followed the instructions to change the necessary location in the firmware, but am unsuccessful in getting an image that is not black. I was able to get the image height/width to change from 2592x1944 to 1920x1080 and have the data seem to be streaming at 30FPS due to capturing the black images and timing it with what it was with the 2592x1944 and saw the decrease in timing by more than half. Please let me know if there is any other methods to take to move forward.

                   

                   

                  If I could have just the barebones neccesities to get this to run that would be ideal. All of the extra functionality I can add from our existing code into the new project. I just do not know the extra steps that need to be taken to add to the mipi config project in order to have it change all the necessary parameters and all of Cypresses documentation is scattered like crazy its impossible to know if I am looking at the right document for my issue. Thank you for your time.

                  • 6. Re: IMX241 CX3 2592x1944 @ 30FPS issues
                    KandlaguntaR_36

                    Hello,

                     

                    Please use the following MIPI Settings:

                     

                    Let us focus on one resolution at a time.

                     

                    Go with 1920X1080 first:

                     

                    I have attached an example project as per your MIPI Transmitter.

                    I have added CyU3PMipicsiSetPhyTimeDelay API. Rest of all is geerated by the CX3 Configtool.

                     

                    You need to add sensor settings imagesensor.c file and .h file.

                     

                    Once everything is done, load the firmware to CX3 device.

                    Ensure that the device enumerated in USB Superspeed mode and came up as UVC device.

                     

                    Open a UVC host application which can decode the RAW 10. Standard host applications cannot decode the RAW10 video data.

                     

                    The standard UVC host applications intiates the data transfer, but they may not show the actual video to you.

                     

                    In order to see whether there is some data streaming to host PC, you may use Wireshark Software USB sniffer. By looking at the capture, we can confirm the size of a frame received by the host application.

                     

                    Other Debugging steps:

                     

                    1. Check the VSYNC, HSYNC test pins and measure the HACTIVE and VACTIVE timing - This will tell that whether the MIPI receiver is getting valid video data/MIPI receiver is configured correctly

                     

                    2. You can enabled printing the MIPI error after every frame by uncommenting "Uncomment the code below to check for MIPI errors per frame"

                     

                    CyU3PMipicsiGetErrors( CyTrue, &errCnts);

                     

                    CyU3PDebugPrint(4,"\n\r%d %d %d %d %d %d %d %d %d",errCnts.crcErrCnt,errCnts.ctlErrCnt, errCnts.eidErrCnt, errCnts.frmErrCnt, errCnts.mdlErrCnt, errCnts.recSyncErrCnt, errCnts.recrErrCnt, errCnts.unrSyncErrCnt, errCnts.unrcErrCnt );

                     

                    If the MIPI receiver is not configured correctly, you will see some errors.

                    • 7. Re: IMX241 CX3 2592x1944 @ 30FPS issues
                      ZaTu_4258396

                      Thank you so much for providing a barebones project! I was wanting to use the 1080p as an example to learn on, but Sony has yet to get back to me on the specific register settings for that resolution. I am not sure of their turnaround time on responses. Is there any way we could just jump onto the solution I need right now, which is the 2592x1944 solution @ 30fps.

                       

                      I have gotten all of the correct register settings for this resolution on the imager module. But need to correct USB descriptors in order to run this resolution.Currently I have the 2592x1944 resolution streaming images ~13.7 FPS. The current USB descriptor settings and probe controls are attached as images to the first post. What are the new and updated ones supposed to look like for this resolution?

                       

                      Thank you for your time!!

                       

                      -Zach

                      • 8. Re: IMX241 CX3 2592x1944 @ 30FPS issues
                        ZaTu_4258396

                        So I still have no response from Sony. Still looking for updated USB descriptors that actually work with this Cypress Config. Everything I try will not allow me to use 2592x1944 @ 30 fps. Is this even possible with the cx3? Judging from the data rate transfer we will be somewhere around 2.4 gbps of data transfer which is well within the max of 5 gbps we have available. Really looking forward to your response. Thank you for your help.

                         

                         

                        -Zach

                        • 9. Re: IMX241 CX3 2592x1944 @ 30FPS issues
                          zatu_4398686

                          Bump.

                           

                          Still looking for applicable setting for 2592x1944 @ 30 fps. Have yet to get past this issue. Sony has been in contact with me and is getting register information for me, but still stuck in limbo with this setting.

                           

                          -Zach