2 Replies Latest reply on Sep 18, 2017 3:53 AM by ramzi.brahmi.94_2324711

    CX3 RAW8 to 24 bit packing

    ramzi.brahmi.94_2324711

      Our sensor outputs RAW8 data over 4 lane MIPI CSI-2. To achieve highest transfer rate between MIPI CSI-2 receiver and GPIF II we need to use 24-bit wide transfers, which fully utilize GPIF II input bus. According to page 9 of TRM, the only mode which fully utilizes 24-bit bus is RGB888.

       

      A possible solution to this issue is packing, mentioned on page 10 of TRM:

      Packing more than one pixel per PCLK is possible. For example, selecting the “MIPI CSI input -Data format"

      configured as "RAW8" and the “MIPI interface configuration – data format” as a 24bit format (RGB888) will

      output three pixel data per PCLK.

      It's unclear, however, where/how to configure the mentioned "MIPI CSI input -Data format" and "MIPI interface configuration – data format" via the CX3 API. The API has CyU3PMipicsiSetIntfParams() function, which has CyU3PMipicsiCfg_t struct parameter with CyU3PMipicsiDataFormat_t dataFormat field. This makes it possible to only configure a single format, not two different formats.

       

      What CX3 API can I use to configure two different formats to enable packing?

       

      I can think of several possibilities, but none is documented:

      Should I use CY_U3P_CSI_DF_RAW8 format in CyU3PMipicsiSetIntfParams(), but set CyU3PMipicsiGpifLoad(CY_U3P_MIPICSI_BUS_24, ...)?

      Should I do as above, but also set CX3_CONFIG_CTRL[DATA MODE] register to non-zero value? (what value?)

      Should I configure CY_U3P_CSI_DF_RGB888 format for CX3, while the sensor output is sill RAW8?

       

      Please, provide clear instructions.

       

      Thank you in advance.

       

       

       

        • 1. Re: CX3 RAW8 to 24 bit packing
          keaj

          You can set the input format by selecting RAW8 from the drop down menu as shown above.

          To set the output format as 24bit you have to choose 24-bit from the output video format drop down list. This will change CyU3PMipicsiDataFormat_t dataFormat as CY_U3P_MIPICSI_BUS_24 .

          On other words, CyU3PMipicsiDataFormat_t dataFormat will be changed based on the Output video format that you will choose from the drop down menu.

           

          In addition to this, you have to also change the GPIF II bus width to 24 bit.

          • 2. Re: CX3 RAW8 to 24 bit packing
            ramzi.brahmi.94_2324711

            Thanks, Keaj!

             

            Your answer confirms my third guess:

            I configure CY_U3P_CSI_DF_RGB888 format for CX3, while the sensor output is sill RAW8

            It means that sensor and CX3 data formats need not be aligned. If I want to use the full bus width I configure CX3 for RGB888 and make sensor output in any format I like (as long as host software can deal with it).