2025-07-23 9:33 AM
Hello,
I'm currently developing on the STM32H750-DK board using TouchGFX. By default, the TouchGFX Designer configures the display for RGB565 color depth, but I would like to use RGB888 (24-bit) color to achieve better image quality and color accuracy for my UI.
I tried modifying the LTDC and DMA2D initialization functions manually via STM32CubeIDE to set the appropriate pixel formats, but the result was a distorted or corrupted display output. It seems like just changing the pixel format in the LTDC config isn't enough.
Could someone please help me with the correct procedure to enable RGB888 on this board? Specifically, I'm looking for:
Required changes in TouchGFX Designer or the generated code to support RGB888.
Proper configuration of LTDC and DMA2D (e.g., pixel format, blending, buffer alignment).
Any changes needed in the framebuffer settings or HAL display driver.
If there’s an example project or reference implementation that demonstrates RGB888, that would be very helpful.
Thanks in advance for your support!
Best regards,
Brijesh
2025-07-30 6:52 AM
Hello @BTKottary27.
For LTDC displays, you should follow the procedure below:
If you follow the steps above on the TBS available in TouchGFX Designer, it works. However, please note that some parts of your code may have the color depth hardcoded. For example, in the TBS, you also need to increase the size of the animation storage in TouchGFXHAL.cpp to enable slide transitions to work.
TouchGFX automatically configures DMA2D for you, so you don't have to change the DMA2D configuration.
The TBS in TouchGFX Designer for STM32H735G Discovery Kit is configured with 24bpp framebuffers, so you can use that as reference.
Best regards,
Johan