RGB666 CSI and LCDIF on i.MX RT 1064

cancel
Showing results for 
Search instead for 
Did you mean: 

RGB666 CSI and LCDIF on i.MX RT 1064

608 Views
SammyP
Contributor I

Hello,

I am trying to figure out how to configure RGB666 input / output on the i.MX RT1064.

Point 1) In the reference manual table 33-4, the RGB666 data format is defined for the CSI periperhal, implying that it is supported. However, there is little further explanation in the rest of the reference manual and the software example and peripheral tool in MCU Expresso do not seem to support this format. I would like to know what specific register settings are required in order to configure the CSI properly for the RGB666 format.

Point 2) Furthermore, there appears to be something unique to the RGB666 format when looking in the table 33-4 because RGB bits are assigned to multiple CSI signals. This is not the case for any of the other formats. I would like to understand how the processor knows what signal to use for a particular bit and if any specific configuration is required in order to achieve this.

Point 3) Also, there is some overlap between LCDIF pins and CSI pins which is a problem if both the LCDIF and CSI were to use RGB666 mode. Specifically, pins GPIO_B1_04 and GPIO_B1_05 are overlapping. If it would be possible to assign RGB bits to different CSI signals as discussed in point 2, then perhaps it would not be an issue.

So in summary, I would like to get some help in configuring the CSI periperhal for RGB666 mode and I would like to understand the peculiarities for this mode as discussed above.

As for the configuration of the LCDIF for RGB666 mode, it seems more straightforward because 18-bit dotclock mode is explicitly supported.

0 Kudos
8 Replies

578 Views
jeremyzhou
NXP TechSupport
NXP TechSupport

Hi,
Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
According to Table 33-4, the CSI module should support the RGB666 format, however, However, it has different configurations for the specific camera sensors.
So I'd like to know the camera sensor you want to use in your design prior to sharing some advice.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

 

0 Kudos

574 Views
SammyP
Contributor I

Hello,

Thanks for your response. I am not able to share the image sensor type, but I can discuss the video format:

  • RGB666 (18bpp, single cycle)
  • active resolution: 256 x 192 pixels
  • frame rate: approximately 60Hz
  • pixel clock: rising edge
  • hsync: active low
  • vsync: active high

If you need any more information, let me know.

In any case, it's not clear to me how the sensor type should impact the pin assignment. The way I see it, there are 6 signals for each of the primary colors (red, green, blue). I can connect these to the i.MX RT 1064 freely, no matter what image sensor is being used. It's just a matter of routing the signals differently on the PCB. Unless I am missing something?

I just want to configure the CSI input port in RGB666 mode in such a way that there is no conflict with the LCDIF pin assignment (also in RGB666 mode). It's just that it is unclear to me how to select a particular assignment.

0 Kudos

557 Views
jeremyzhou
NXP TechSupport
NXP TechSupport

Hi,

1) Unless I am missing something?
-- I think you miss the data bus width that the RGB666 (18 bit) frame will transfer to, moreover, you don't mention the format to store an RGB666 (18 bit) frame, does it use 4 bytes or 3 bytes?
This information should be included in the datasheet of the image sensor, so I hope you can share it.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

 

0 Kudos

551 Views
SammyP
Contributor I

"I think you miss the data bus width that the RGB666 (18 bit) frame will transfer to"

Not sure what you mean with "the data bus width that the frame will transfer to". The camera has 18 data lines. 6 bits are used for each color (R, G and B). So the data bus is 18 bits wide.

"Moreover, you don't mention the format to store an RGB666 (18 bit) frame, does it use 4 bytes or 3 bytes?"

The format is RGB666, 6 bits per color. The image sensor transfers pixels in a single cycle (so 18 bits are transferred on every clock edge). How this data is stored in memory is determined by how the image sensor data lines are connected to the CSI inputs of the i.MX and the configuration of the i.MX. Whether that is in 3 bytes or 4 bytes with bit stuffing depends purely on the configuration of the i.MX no?

 

Perhaps my main question was not clear enough and I need to clarify. Referring to the following table from the reference manual, you can see that some bits in the RGB666 configuration are assigned to multiple CSI data lines. The main question is: how do I configure what lines are used for a particular bit. For example, DATA[14] and DATA[15] are assigned to G[4] and G[5] respectively. However, DATA[8] and DATA[9] are also assigned to G[4] and G[5]. How do I select what DATA line is used for G[4] and G[5]?

SammyP_0-1645087691665.png

Because some of the CSI pins also overlap with the pins used for the LCDIF when configured in RGB666 mode, I cannot use DATA[14] and DATA[15] and would need to use DATA[8] and DATA[9] instead.

0 Kudos

540 Views
jeremyzhou
NXP TechSupport
NXP TechSupport

Hi,
Sorry for replying late.
1) How do I select what DATA line is used for G[4] and G[5]?
-- After digging deeper, the pin assignment is correct, as the two MSB bits are duplicated on LSB bits implementing color extension.
Until now, the CSI driver hasn't supported the RGB666 format, so it needs the developers to adjust the driver by themselves.
Definitely, if you encounter some troubles, please create another post for them.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

535 Views
SammyP
Contributor I

Okay, that's good news however it's still not entirely clear to me how this all works. You say the MSB's are duplicated on the LSB's, but can you elaborate a bit more on how the CSI module knows what data line to use for what color bit? Will it just automatically pick whatever line is enabled in the pinmux?

For example, let's say I want to use DATA[8] and DATA[9] for G[4] and G[5] as opposed to DATA[14] and DATA[15]. Is it enough to just enable the signals I want to use in the pinmux?

Are there any restrictions on selecting particular lines? For example, what happens if I want to use DATA[8] for G[4] and DATA[15] for G[5]. Will that work as well?

0 Kudos

528 Views
jeremyzhou
NXP TechSupport
NXP TechSupport

Hi,

Thanks for your reply.
1) You say the MSB's are duplicated on the LSB's, but can you elaborate a bit more on how the CSI module knows what data line to use for what color bit?
-- Unfortunately, I don't know, as I and my fellow haven't encountered any customer use the RGB666 format before, however, I guess the pin assignment is related to RGB666 transmit protocol, so I'd like to suggest you refer to the datasheet image sensor, I believe it will explain that.
Have a great day,
TIC

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

590 Views
SammyP
Contributor I

Is anyone able to provide support for this?

0 Kudos