2021-12-15 04:46 AM
I want to drive an RGB 222 screen using LTDC, however the only stm32 chip I found that support LTDC RGB222 mode is stm32l4p/stm32l4q series. I can not find the RGB 222 option in other chips(only RGB 888, RGB 565, ETC). Is stm32l4 the only series that support LTDC RGB 222 mode? Can I use the RGB888 mode to drive a RGB 222 screen? Is there any method to convert?
Solved! Go to Solution.
2021-12-15 10:30 AM
Hello @JLi.21 and welcome to the Community :)
All devices that contain LTDC feature, support RGB222 mode.
The LTDC always outputs RGB888 formats, then each format is available as long as the corresponding AFs availability: i.e. RGB222 mode is available as soon the package included the alternate R7, G7, B7, R6, G6 and B6.
Also, the RGB565 mode is available as soon the package included the alternate R[7:3] G[7:2] B[7:3].
For RGB666 the AFs should be available are R[7:2] G[7:2] B[7:2].
I advise you to use STM32CubeMX tool to configure the LTDC peripheral and use RGB222 mode.
Have a look at this AN4861 Application note LCD-TFT display controller (LTDC) on STM32 MCUs, which describes the LCD-TFT display controller of the STM32 MCUs and demonstrates how to use and configure the LTDC peripheral.
Hope my answer helped you!
When your question is answered, please close this topic by choosing Select as Best.
Imen
2021-12-15 10:30 AM
Hello @JLi.21 and welcome to the Community :)
All devices that contain LTDC feature, support RGB222 mode.
The LTDC always outputs RGB888 formats, then each format is available as long as the corresponding AFs availability: i.e. RGB222 mode is available as soon the package included the alternate R7, G7, B7, R6, G6 and B6.
Also, the RGB565 mode is available as soon the package included the alternate R[7:3] G[7:2] B[7:3].
For RGB666 the AFs should be available are R[7:2] G[7:2] B[7:2].
I advise you to use STM32CubeMX tool to configure the LTDC peripheral and use RGB222 mode.
Have a look at this AN4861 Application note LCD-TFT display controller (LTDC) on STM32 MCUs, which describes the LCD-TFT display controller of the STM32 MCUs and demonstrates how to use and configure the LTDC peripheral.
Hope my answer helped you!
When your question is answered, please close this topic by choosing Select as Best.
Imen
2021-12-15 01:03 PM
To spare memory, internally you can use the L8 format and construct the lookup table (palette) so that in LTDC L8 is effectively converted from 1-byte RGB222 (with 2 bits unused) to RGB888 for displaying.
JW
2021-12-15 05:58 PM
Thanks! You answer is really helpful!
2021-12-15 06:05 PM
Also, thank you for your warmly welcome.
2021-12-15 06:06 PM
Thank you for your answer. I will also try to drive it with L8 mode.