CX3 RAW8 to 24 bit packing

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

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.

0 Likes
1 Solution
Keerthy_V
Moderator
Moderator
Moderator
First like given 250 sign-ins 50 solutions authored

pastedImage_0.png

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.

View solution in original post

0 Likes
4 Replies
Keerthy_V
Moderator
Moderator
Moderator
First like given 250 sign-ins 50 solutions authored

pastedImage_0.png

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.

0 Likes
Anonymous
Not applicable

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).

0 Likes

Gents,

When selecting this configuration (CY_U3P_CSI_DF_RGB888 , RAW8) with 24bits GPIF bus, does it means that line length should be a multiple of 24 bits (3 RAW8 pixels) ?

if not, If my sensor frame size is 320x200x8bits how much bytes will I get for each line ... 321 ?

Thanks in advance,

Stéphane

0 Likes

Hello Stéphane,

When you pack the incoming data into 24 bits, the line length should be a multiple of 24 bits. This is already documented in the following KBA:
https://community.cypress.com/t5/Knowledge-Base-Articles/Streaming-RAW10-Format-Input-Data-to-16-24-...

If the line length is not a multiple of 24 bits, then you will get extra data at the host side.

Regarding the following question:

"if not, If my sensor frame size is 320x200x8bits how much bytes will I get for each line ... 321 ?"

Yes, in this case, you will get 321 bytes for each line.

Best Regards,
Jayakrishna
0 Likes