Skip to main content
Sany
Associate III
Dec 18, 2024 9:52 AM UTC
Question

STM32U575 and 2.3" TFT with ILI9341 Driver, wrong colors

Hello,

I have a STM32U575 and a 2.3" TFT with ILI9341, i use TouchGFX, thats works fine, after my GPDMA1 is correctly configured. (I Hope my GPMDA1 is correctly configured, and it's not a problem with the Transmitting DMA)

Now i have 3 Screens, (Red, Green, Blue) but i have the problem, the colors on my display was wrong.

"Red = Magenta","Green=Green","Blue=Black"

The TFT is a RGB565, the Driver uses RGB565, the TFT is in the 16-Bit mode, and my SPI on 8-Bit mode.
How must i change, to show the correct colors on my display?

I found a thread in this forum, but there is no solution, only a hint "swap the bytes it's a problem between 16 bit display and 8 bit SPI...."..

my code i use is attached.

 

Thanks daniel

This topic has been closed for replies.

2 replies

Andrew Neil
Super User
Dec 18, 2024 10:01 AM UTC

@Sany wrote:

I found a thread in this forum


Please give a link.

 


@Sany wrote:

but there is no solution, only a hint "swap the bytes it's a problem between 16 bit display and 8 bit SPI...."..


So did you try that?

 

PS:

Don't forget to provide the link to here in your previous thread

A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Visitor II
Sep 15, 2025 7:19 AM UTC

The same problem we encountered. My solution is to access ILI9341 controller with a command 0x21 which is used to turn display inversion on, according to my datasheet given.

It is supposed to modify your initialization method ILI9341_Init() in source file ili9341.c.