2022-12-20 08:16 PM
Am working on STM32H745BIT6 device with 16bit external SDRAM, 800x480 resolution RGB parallel TFT-LCD. On the Hardware all 24 RGB lines are connected to LCD.and LCD also supports 24 RGB. Plan to use TouchGFX for developing application.
For using 565 color mode Do I have to set the Display type in cubeMX LTDC section to 565 or can it be kept as RGB 888 and configure application to use 565 for drawing purpose only.
To summarise I have 2 questions below,
Thanks
Anuj
2022-12-30 12:17 AM
Hello @Community member
First let me thank you for posting .
It sounds like you are working on an STM32H745BIT6 microcontroller with an external SDRAM and an RGB parallel TFT-LCD display, and you are planning to use TouchGFX for your application. You have two questions about the color mode for the display: whether the display type in STM32CubeMX should be set to 565 or whether it can be set to 888 and the application can use 565, and whether a 16-bit SDRAM is sufficient for 888 color mode or if a 32-bit SDRAM is needed.
In general, you should set the display type in STM32CubeMX to match the color depth of the display. If your display supports 565 color mode, you should set the display type to 565 in STM32CubeMX. If your display supports 888 color mode, you should set the display type to 888 in STM32CubeMX. However, it is possible to set the display type to a different value in STM32CubeMX and then configure the application to use a different color depth. For example, you could set the display type to 888 in STM32CubeMX and then configure the application to use 565 color mode. This may be useful if you want to use the same configuration for different displays with different color depths.
2.SDRAM for 888 color mode: The amount of SDRAM needed for a given color depth depends on the resolution of the display and the number of bits used to represent each pixel. For a display with a resolution of 800x480 and 888 color mode, you will need at least 24 bits per pixel x 800 pixels x 480 pixels = 11,520,000 bits of SDRAM. This is equivalent to 1,440,000 bytes or 1.44 MB of SDRAM. If you are using a 16-bit SDRAM, you will need at least 2.88 MB of SDRAM to support 888 color mode. Therefore, a 16-bit SDRAM should be sufficient for 888 color mode on a display with this resolution.
However, it is always a good idea to verify that you have enough SDRAM for your application by checking the memory usage of your application and comparing it to the total amount of available SDRAM. You may also want to consider allowing for some additional headroom to account for any additional memory requirements that may arise during runtime.
I hope this information helps. Let me know if you have any additional questions.
Thx
Ghofrane
2023-01-10 08:04 PM
Thanks you for your reply. I got a clear understnading now.