1 2 Previous Next 25 Replies Latest reply on Jul 11, 2019 10:53 PM by TakashiM_61

    1600x1300 resolution for CX3

    shhac_4101246

      Does CX3 support 1600x1300 resolution?

      We are going to use OV2311(1600x1300 RAW10), and want to have setting example to support this resolution.

       

      Best Regards,

        • 1. Re: 1600x1300 resolution for CX3
          KandlaguntaR_36

          Hello,

           

          Yes, CX3 support 1600x1300 RAW 10.

           

          Can you please provide the following to get the MIPI configuration parameters?

           

          1. CSI Clock

          2. Number of Lane

          3. THS Prepare

          4. THS Zero

          5. Frame Rate

          6. HActive - 1600

          7. HBlanking

          8.VActive - 1300

          9. VBlanking

          10. data format - RAW10

          • 2. Re: 1600x1300 resolution for CX3
            shhac_4101246

            Hello,

             

            Thank you for the response.

            I'm using following parameter.

             

            1. CSI Clock - 400MHz

            2. Number of Lane - 2

            3. THS Prepare - 70

            4. THS Zero - 90

            5. Frame Rate - 15

            6. HActive - 1600

            7. HBlanking -  2016

            8.VActive - 1300

            9. VBlanking - 174

            10. data format - RAW10

             

            When I use above parameter, I got attached weird output image on eCamView.

            I also tested with VLC, AMcap, I got same result.

             

            Looks like somehow blue square image is overwritten to red square area.

            Even if I use color image from image sensor(OV2311), I saw same behavior.

            image1.png

            image2.png

            I also checked OV2311 register setting, but I could see correct image is outputted from OV2311 eva board.

            So looks like OV2311 setting is okay.

             

            Let me know if you have any suggestion to resolve this issue.

            • 3. Re: 1600x1300 resolution for CX3
              KandlaguntaR_36

              Since you are streaming RAW10 video format, the standard UVC host applications cannot stream RAW10 format. You need to customize the host application as needed.

               

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

               

              Please confirm whether you are using the following MIPI configuration parameters;

               

              /* Example_YUY2_Resolution0 :  */

              CyU3PMipicsiCfg_t Example_YUY2_Resolution0 =

              {

                  CY_U3P_CSI_DF_YUV422_8_2,  /* CyU3PMipicsiDataFormat_t dataFormat */

                  2,                          /* uint8_t numDataLanes */

                  2, /* uint8_t pllPrd */

                  123, /* uint16_t pllFbd */

                  CY_U3P_CSI_PLL_FRS_250_500M, /* CyU3PMipicsiPllClkFrs_t pllFrs */

                  CY_U3P_CSI_PLL_CLK_DIV_4, /* CyU3PMipicsiPllClkDiv_t csiRxClkDiv */

                  CY_U3P_CSI_PLL_CLK_DIV_4, /* CyU3PMipicsiPllClkDiv_t parClkDiv */

                  0,                 /* uint16_t mClkCtl */

                  CY_U3P_CSI_PLL_CLK_DIV_2, /* CyU3PMipicsiPllClkDiv_t mClkRefDiv */

                  1600,         /* uint16_t hResolution */

                  50                         /* uint16_t fifoDelay */

              };

               

              Configure the THS Settle value to 11 using CyU3PMipicsiSetPhyTimeDelay API

              • 4. Re: 1600x1300 resolution for CX3
                shhac_4101246

                Hello,

                 

                Thanks for your reply.
                Yes, we have host application which converts YUY2 data to RAW10 video format.
                Even if we use that application, we saw this overlay issue.

                 

                1. We updated our firmware to use your proposed Mipicsi setting and added CyU3PMipicsiSetPhyTimeDelay.
                    With this firmware, camera app showed black screen.
                    And dma callback on CX3 tried to send 2,600,000 bytes data(1600 x 1300 x 10/8).

                    Is this expected behavior?

                 

                2. I added following line after CyU3PMipicsiSetIntfParams(). Is this okay?

                    CyU3PMipicsiSetPhyTimeDelay(1, 11);

                 

                3. When I replaced CY_U3P_CSI_DF_YUV422_8_2 to CY_U3P_CSI_DF_RAW10, I could see video stream on camera app,
                    but output image was same as before. Still seeing overwritten image.(dma callback on CX3 sent 4,160,000 bytes 1600x1300x16/8)

                    Do you think this overwritten image issue is caused by setting difference between YUY2 and RAW10?

                 

                Best Regards,

                • 5. Re: 1600x1300 resolution for CX3
                  shhac_4101246

                  Hi KandlaguntaR_36,

                   

                  Any update on this?

                  • 6. Re: 1600x1300 resolution for CX3
                    KandlaguntaR_36

                    Answering your queries:

                     

                    Yes, we have host application which converts YUY2 data to RAW10 video format.

                    Even if we use that application, we saw this overlay issue.

                     

                    >> The host application should consider that the USB device is sending the video in RAW10 format and display the same. The standard UVC application considers the received data as YUY2 and does the conversion.

                     

                    1. We updated our firmware to use your proposed Mipicsi setting and added CyU3PMipicsiSetPhyTimeDelay.
                        With this firmware, camera app showed black screen.
                        And dma callback on CX3 tried to send 2,600,000 bytes data(1600 x 1300 x 10/8).

                        Is this expected behavior?

                     

                    >> Yes, this is expected. You are receiving the exact frame size as per 1600x1300x10 bits. The standard UVC host application decodes the received image as per YUY2 format. You need to write your own code to display RAW10 data.

                     

                    2. I added following line after CyU3PMipicsiSetIntfParams(). Is this okay?

                        CyU3PMipicsiSetPhyTimeDelay(1, 11);

                    >> This is okay. Hope you have passed the second arguments of  CyU3PMipicsiSetIntfParams as CyFalse.

                     

                    3. When I replaced CY_U3P_CSI_DF_YUV422_8_2 to CY_U3P_CSI_DF_RAW10, I could see video stream on camera app,
                        but output image was same as before. Still seeing overwritten image.(dma callback on CX3 sent 4,160,000 bytes 1600x1300x16/8)

                     

                    >> Here, you are receiving 16bits per pixel instead 10 bits per pixel. You need to remove the additional 6 bits per pixel and do the display in your custome application. This is same question 1.

                     

                        Do you think this overwritten image issue is caused by setting difference between YUY2 and RAW10?

                    >> It could be due to host application implementation.

                     

                    Please probe the HSYNC, VSYNC and PCLK test pins and check whether the timings are correct. Measure the HACTIVE, VACTIVE and blanking times.

                    • 7. Re: 1600x1300 resolution for CX3
                      shhac_4101246

                      Hello,

                       

                      We use our application to display RAW10 and works properly with "OV2311 sensor + FX3".

                      However, when we use CX3, we have this issue.

                      So I think host application implementation is correct. Issue is coming from CX3 side.

                       

                      We also tried to use CY_U3P_CSI_DF_YUV422_8_2, but this overlay issue was still exist.

                      With FX3, we used MIPI clock free running setting, but somehow free running didn't work on CX3(DMA counter is not incremented), so we change sensor setting to Gate clock.

                       

                      We've already checked CX3 Hardware: Frequently Asked Questions - KBA91295  and our sequence is same  as recommended sequence.

                       

                      Do you think this overlay behavior is caused by this clock setting?

                       

                      Best Regards,

                      • 8. Re: 1600x1300 resolution for CX3
                        shhac_4101246

                        Hello,

                         

                        The issue occurs if width is bigger than 1360.

                        Let me know if you have any suggestion.

                         

                        <1360x1300>

                         

                        <1376x1300 RAW10>

                        • 9. Re: 1600x1300 resolution for CX3
                          KandlaguntaR_36

                          Hello,

                           

                          In 1376x1300 picture, we can see that the additional 16 (1376 - 1360) pixel information is overlayed.

                           

                          Q: Do you think this overlay behavior is caused by this clock setting?

                           

                          This overlay behavior does not depend on clock settings as far as you are seeing the frame size as 2,600,000 bytes data(1600 x 1300 x 10/8).

                          You can also confirm this by probing the HSYNC, VSYNC and PCLK; this will also tell the frame size. Measure the active and blanking time of every parameter.

                           

                          Please confirm whether 1600x1300 is streaming fine in case of FX3 + image sensor with the same host application with images (screenshots).

                          • 10. Re: 1600x1300 resolution for CX3
                            shhac_4101246

                            Hello,

                             

                            Thanks for your reply.

                             

                            We tested with changing following parameter(Width in pixel) in CX3RDKOV5640Dscr.c and changed ISP output size on image sensor side.

                             

                              0x1E, /* Descriptor size */

                              ES_UVC_CS_INTRFC_DESCR, /* Descriptor type*/

                            #if !hd

                              0x05, /* Subtype: frame interface*/

                              0x01, /* Frame Descriptor Index: 1 */

                              0x00, /* No Still image capture method supported */

                              0x50,0x05, /* Width in pixel: 1600 */

                             

                            >In 1376x1300 picture, we can see that the additional 16 (1376 - 1360) pixel information is overlayed.

                            Actually, additional 16 pixel information is not overlayed.

                            Please see following image.

                             

                            <1360 x 1300>

                             

                            <1600x1300>

                             

                            Left side shows same area, and when I increased width size, right side image is extended.

                            And right side image is overlayed on left side.(But a few pixels on left side shows correct image though).

                             

                             

                            >Please confirm whether 1600x1300 is streaming fine in case of FX3 + image sensor with the same host application with images (screenshots).

                            Following image is with FX3 + OV2311 with the same host application(1600x1300).

                            It doesn't show overlayed image and works fine.

                             

                             

                            >You can also confirm this by probing the HSYNC, VSYNC and PCLK; this will also tell the frame size. Measure the active and blanking time of every parameter.

                            Yes, we will measure these parameter ASAP.

                             

                            Best Regards,

                            • 11. Re: 1600x1300 resolution for CX3
                              KandlaguntaR_36

                              Edited:

                               

                              1. Change the all relevant fields in Uncompressed VS frame descriptor.

                               

                              The sample descriptors are for 1080p@30fps.

                               

                              /* Class specific Uncompressed VS Frame Descriptor 1 - 1080p@30fps */

                                  0x1E,                               /* Descriptor size */

                                  CX3_CS_INTRFC_DESCR,                /* Descriptor type*/

                                  0x05,                               /* Subtype: Uncompressed frame interface*/

                                  0x01,                               /* Frame Descriptor Index: 1 */

                                  0x00,                               /* No Still image capture supported */

                                  0x80, 0x07,                         /* Width in pixel:  1920 */

                                  0x38, 0x04,                         /* Height in pixel: 1080 */

                                  0x00, 0x80, 0x53, 0x3B,             /* Min bit rate (bits/s): 1080 x 1920 x 2 x 30 x 8 = 995328000 */

                                  0x00, 0x80, 0x53, 0x3B,             /* Max bit rate (bits/s): Fixed rate so same as Min */

                                  0x00, 0x48, 0x3F, 0x00,             /* Maximum video or still frame size in bytes(Deprecated): 1920 x 1080 x 2 */

                                  0x15, 0x16, 0x05, 0x00,             /* Default frame interval (in 100ns units): (1/30)x10^7 */

                                  0x01,                               /* Frame interval type : No of discrete intervals */

                                  0x15, 0x16, 0x05, 0x00,             /* Frame interval 3: Same as Default frame interval */

                               

                              2. You are also need to change the probe control structures when you change the resolution.

                               

                              Sample Probe Control Structure for 1080p@30fps

                               

                              /* UVC Probe Control Setting - 1080p@30FPS */

                              uint8_t const gl1080pProbeCtrl[CX3_APP_MAX_PROBE_SETTING] = {

                                  0x00, 0x00,                         /* bmHint : No fixed parameters */

                                  0x01,                               /* Use 1st Video format index */

                                  0x01,                               /* Use 1st Video frame index */

                                  0x15, 0x16, 0x05, 0x00,             /* Desired frame interval in 100ns = (1/30)x10^7 */

                                  0x00, 0x00,                         /* Key frame rate in key frame/video frame units */

                                  0x00, 0x00,                         /* PFrame rate in PFrame / key frame units */

                                  0x00, 0x00,                         /* Compression quality control */

                                  0x00, 0x00,                         /* Window size for average bit rate */

                                  0x00, 0x00,                         /* Internal video streaming i/f latency in ms */

                                  0x00, 0x48, 0x3F, 0x00,             /* Max video frame size in bytes = 1920 x 1080 x 2 */

                              #ifdef CX3_UVC_1_0_SUPPORT

                                  0x00, 0x90, 0x00, 0x00              /* No. of bytes device can rx in single payload: 36KB */

                              #else

                                  /* UVC 1.1 Probe Control has additional fields from UVC 1.0 */

                                  0x00, 0x90, 0x00, 0x00,             /* No. of bytes device can rx in single payload: 36KB */

                                  0x00, 0x60, 0xE3, 0x16,             /* Device Clock */

                                  0x00,                               /* Framing Information - Ignored for uncompressed format*/

                                  0x00,                               /* Preferred payload format version */

                                  0x00,                               /* Minimum payload format version */

                                  0x00                                /* Maximum payload format version */

                              #endif

                              };

                               

                              Please share your probe control structures for 1360x1300 and 1600x1300 resolutions.

                              Can you please share the CX3 firmware atleast snippets - DMA Channel Creation; DMACallback?

                               

                              Please let me know what is the reference firmware you have used for this application - looks like you used OV5640.

                              • 12. Re: 1600x1300 resolution for CX3
                                shhac_4101246

                                Hi,

                                 

                                Thanks for your checking.

                                We are using Denebola – USB 3.0 UVC Reference Design Kit (RDK) for the reference.

                                 

                                We modified CX3RDKOV5640 and added some functions for our product requirement.

                                 

                                Here is the 1600x1300 probe setting.

                                 

                                   0x00, 0x00, /* bmHint : No fixed parameters */

                                   0x01, /* Use 1st Video format index */

                                   0x01, /* Use 1st Video frame index */

                                   0x2a,0x2c,0x0a,0x00, /* Desired frame interval in 100ns = (1/30)x10^7 */

                                   0x00, 0x00, /* Key frame rate in key frame/video frame units */

                                   0x00, 0x00, /* PFrame rate in PFrame / key frame units */

                                   0x00, 0x00, /* Compression quality control */

                                   0x00, 0x00, /* Window size for average bit rate */

                                   0x00, 0x00, /* Internal video streaming i/f latency in ms */

                                   0x00,0x7a,0x3f,0x00, /* Max video frame size in bytes = 1920 x 1080 x 2 */

                                   0x00, 0x90, 0x00, 0x00 /* No. of bytes device can rx in single payload: 36KB */

                                 

                                And this is our descriptor.

                                 

                                  0x1E, /* Descriptor size */

                                  ES_UVC_CS_INTRFC_DESCR, /* Descriptor type*/

                                  0x05, /* Subtype: frame interface*/

                                  0x01, /* Frame Descriptor Index: 1 */

                                  0x00, /* No Still image capture method supported */

                                  0x40,0x06, /* Width in pixel: 1600 */

                                  0x14,0x05, /* Height in pixel: 1300 */

                                  0x00,0x30,0xc1,0x1d, /* Min bit rate (bits/s): 1600 x 1300 x No Of Bits per Pixel x FrameRate = 499200000 */

                                  0x00,0x30,0xc1,0x1d, /* Max bit rate (bits/s): Fixed rate so same as Min */

                                  0x00,0x7a,0x3f,0x00, /* Maximum video or still frame size in bytes(Deprecated): 1600 x 1300 x 2 */

                                  0x2a,0x2c,0x0a,0x00, /* Default frame interval (in 100ns units): (1/30)x10^7 */

                                  0x01, /* Frame interval type : No of discrete intervals */

                                  0x2a,0x2c,0x0a,0x00, /* Frame interval 3: Same as Default frame interval */

                                 

                                We didn't modify DMA Channel creation and DMACallback from CX3RDKOV5640.

                                 

                                Is it possible to test 1600 x XXX resolution at your side with CX3?

                                 

                                Best Regards,

                                • 13. Re: 1600x1300 resolution for CX3
                                  KandlaguntaR_36

                                  Please share /* Class specific Uncompressed VS format descriptor */ and MIPI Configuration structure as well.

                                   

                                  Sample is here.

                                  /* Class specific Uncompressed VS format descriptor */

                                      0x1B,                               /* Descriptor size */

                                      CX3_CS_INTRFC_DESCR,                /* Class-specific VS interface Type */

                                      0x04,                               /* Subtype : VS_FORMAT_UNCOMPRESSED */

                                      0x01,                               /* Format desciptor index */

                                      0x04,                               /* Number of Frame Descriptors that follow this descriptor: 3 */

                                     

                                      /* GUID, globally unique identifier used to identify streaming-encoding format: YUY2  */

                                      0x59, 0x55, 0x59, 0x32,             /*MEDIASUBTYPE_YUY2 GUID: 32595559-0000-0010-8000-00AA00389B71 */

                                      0x00, 0x00, 0x10, 0x00,

                                      0x80, 0x00, 0x00, 0xAA,

                                      0x00, 0x38, 0x9B, 0x71,

                                      0x10,                               /* Number of bits per pixel: 16*/

                                      0x01,                               /* Optimum Frame Index for this stream: 2 (1080p) */

                                      0x00,                               /* X dimension of the picture aspect ratio; Non-interlaced */

                                      0x00,                               /* Y dimension of the pictuer aspect ratio: Non-interlaced */

                                      0x00,                               /* Interlace Flags: Progressive scanning, no interlace */

                                      0x00,                               /* duplication of the video stream restriction: 0 - no restriction */

                                   

                                   

                                  * Example_YUY2_Resolution0 :  */

                                  CyU3PMipicsiCfg_t Example_YUY2_Resolution0 =

                                  {

                                      CY_U3P_CSI_DF_YUV422_8_2,  /* CyU3PMipicsiDataFormat_t dataFormat */

                                      2,                          /* uint8_t numDataLanes */

                                      2, /* uint8_t pllPrd */

                                      123, /* uint16_t pllFbd */

                                      CY_U3P_CSI_PLL_FRS_250_500M, /* CyU3PMipicsiPllClkFrs_t pllFrs */

                                      CY_U3P_CSI_PLL_CLK_DIV_4, /* CyU3PMipicsiPllClkDiv_t csiRxClkDiv */

                                      CY_U3P_CSI_PLL_CLK_DIV_4, /* CyU3PMipicsiPllClkDiv_t parClkDiv */

                                      0,                 /* uint16_t mClkCtl */

                                      CY_U3P_CSI_PLL_CLK_DIV_2, /* CyU3PMipicsiPllClkDiv_t mClkRefDiv */

                                      1920,         /* uint16_t hResolution */

                                      50                         /* uint16_t fifoDelay */

                                  };

                                  • 14. Re: 1600x1300 resolution for CX3
                                    shhac_4101246

                                    Edited.

                                    #We are using CY_U3P_CSI_DF_RAW10

                                     

                                    Here is our configuration.

                                     

                                    Please review these parameter and let me know if you find anything.

                                     

                                    /* Class specific Uncompressed VS format descriptor */
                                    0x1B,                               /* Descriptor size */
                                    ES_UVC_CS_INTRFC_DESCR,                /* Class-specific VS interface Type */
                                    0x04,                               /* Subtype : VS_FORMAT_UNCOMPRESSED */
                                    0x01,                               /* Format desciptor index */
                                        0x01,                               /* Number of Frame Descriptors that follow this descriptor: 3 */

                                    /* GUID, globally unique identifier used to identify streaming-encoding format: YUY2  */
                                    0x59, 0x55, 0x59, 0x32,             /*MEDIASUBTYPE_YUY2 GUID: 32595559-0000-0010-8000-00AA00389B71 */
                                    0x00, 0x00, 0x10, 0x00,
                                    0x80, 0x00, 0x00, 0xAA,
                                    0x00, 0x38, 0x9B, 0x71,
                                    0x10,                               /* Number of bits per pixel: 16*/
                                    0x01,                               /* Optimum Frame Index for this stream: 2 (720p) */
                                    0x00,                               /* X dimension of the picture aspect ratio; Non-interlaced */
                                    0x00,                               /* Y dimension of the pictuer aspect ratio: Non-interlaced */
                                    0x00,                               /* Interlace Flags: Progressive scanning, no interlace */
                                    0x00,                               /* duplication of the video stream restriction: 0 - no restriction */

                                     

                                    CyU3PMipicsiCfg_t is as follows.

                                     

                                        CY_U3P_CSI_DF_RAW10,  /* CyU3PMipicsiDataFormat_t dataFormat */

                                        2,                          /* uint8_t numDataLanes */

                                        2, /* uint8_t pllPrd */

                                        123, /* uint16_t pllFbd */

                                        CY_U3P_CSI_PLL_FRS_250_500M, /* CyU3PMipicsiPllClkFrs_t pllFrs */

                                        CY_U3P_CSI_PLL_CLK_DIV_4, /* CyU3PMipicsiPllClkDiv_t csiRxClkDiv */

                                        CY_U3P_CSI_PLL_CLK_DIV_4, /* CyU3PMipicsiPllClkDiv_t parClkDiv */

                                        0,                 /* uint16_t mClkCtl */

                                        CY_U3P_CSI_PLL_CLK_DIV_2, /* CyU3PMipicsiPllClkDiv_t mClkRefDiv */

                                        1600,         /* uint16_t hResolution */

                                        50                         /* uint16_t fifoDelay */

                                    1 2 Previous Next