i.MX RT 1064 CSI Data Packing

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX RT 1064 CSI Data Packing

503 Views
SammyP
Contributor I

Hello,

I am trying to take in RGB666 data on an i.MX RT 1064 using the CSI module and outputting it to an RGB666 bus on the eLCDIF. However, I am having some difficulty with getting the color bits packed properly in memory.

I have made a thread before about this, but no real solution was provided. https://community.nxp.com/t5/i-MX-Processors/RGB666-CSI-and-LCDIF-on-i-MX-RT-1064/m-p/1415140#M18711...

If it were at all possible, I would just use RGB888 for the CSI and only connect 6 bits per pixel. However, this is not possible because some of the CSI signals overlap with the eLCDIF (CSI_DATA14 and CSI_DATA15 conflict with LCD_DATA16 and LCD_DATA17). Thus I was hoping to configure the CSI somehow to use RGB666, so I connected my input as such:

csi_lcd_connections.png

I can read the CSI data and display an image on my LCD, however unfortunately the bits are not packed correctly in memory so the image is off-color. Instead, the CSI input is treated as if it was RGB888 and my bits are not packed in order. Now there could be some way to mask and/or shift the bits in software but that is highly CPU intensive so it is not an option for me.

Table 33-4 in the reference manual of the SoC shows some CSI input data formats. And RGB666 is mentioned as one of the options. My connections are shown in the following figure:

csi_input_data_formats.png

This seems legal to me? All my bits are assigned properly, although it is strange that RGB666 is the only format that has the same color bit assigned to different CSI pins (such as B4 which is assigned to CSI0 as well as CSI6).

This table is highly confusing to me because I can't find any clear link between the formats and the register settings of the CSI. What exactly is this table supposed to refer to? I noticed that on later SoCs, such as the RT1170 there are actual mapping options in the register CSI_CSICR18 for RGB666 among others, but these are not present on the RT1064. Can you please explain what this table is and how the CSI can be configured for RGB666 as shown in the table? And if it is not possible, it should not be mentioned in the reference manual.

0 Kudos
3 Replies

495 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @SammyP ,

After check  the RM, it seems that the RT can support the RGB666 with 1cycle, But when connecting the camera, will reuse some signal, expand the RGB666 to RGB888 with the MSB to the lowest:

     After that, we can treat this camera as a RGB24 camera. so, in my opinion, we just need to enable the CSICR18:3:PARALLEL24_EN, then we can use this camera as usual with the same SDK.

    So, I'm afraid you have to change to other camera.

 

Regards,

Jing

 

Regards,

Jing

0 Kudos

488 Views
SammyP
Contributor I

So this would mean the table 33-4 is not entirely correct? I.e. CSI pins 0,1, 8, 9, 16 and 17 cannot be used for RGB666?

0 Kudos

486 Views
jingpan
NXP TechSupport
NXP TechSupport

Hi @SammyP ,

Yes, it seems CSI hasn't RGB666 mode.

 

Regards,

Jing

0 Kudos