cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H747I-DISCO 16-bit Color Depth Problem

Gökhan
Associate II

Hello,

I have a stm32h747i-disco board. When I create a touchGFX project by using touchGFX designer template, it works perfectly. Its color depth is 24-bit and when I change color depth to 16-bit(RGB565), it fails.

To change color depth to 16-bit, firstly I am changing Framebuffer Pixel Format section to RGB565 like in the below:

1.png

 

Then I am changing the Layer 0 - Pixel Format section to RGB565 like in the below:

2.png

 

Before pressing to cubeMX save button, I am deleting target folder. After that, pressing cubeMX save button. Ref: https://community.st.com/t5/stm32-mcus-touch-gfx-and-gui/8-bpp-color-palette/m-p/221627

Later, I am opening touchGFX project and as you can see it is 16-bit now.

3.png

Then I am pressing "generate code" button and finally, i'm downloading new 16-bit project to stm32h747-i disco but it shows me this screen when I try to use 16-bit color depth. It fails.

4.jpg

 

However, when i use 24-bit color depth, it shows me this screen as expected and works without any problem!!!

5.jpg

 

How can I use STM32H747I-DISCO development board with 16-bit color depth? What am I missing? What should I do? Thank you for all answers!

12 REPLIES 12

Fix DSI transport mode so data funnelled from LTDC appropriately. The display controller (on the screen/panel itself) also needs to expect the bit, byte, and lanes in the mode you're pushing over the wires.

2xDSI.png

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Settings need to be coherent end-to-end. All of them..

So double check DSIHOST, LTDC, and Panel itself all have common expectations for data from the frame buffer.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Gökhan
Associate II

Thank you for the answer. I can configure DSIHOST and LTDC for 16-bit color depth by using cubeMX but how can i configure the panel itself for 16-bit? Should I do something physically?

As your suggestion, I changed Display Type to RGB656.

6.png

 

Then I changed DMA2D Color Code to RGB565.

7.png

 

Unfortunately it didn't work.

8.jpg

 

To summarize, I changed;

1-) TouchGFX Framebuffer Pixel Format to RGB565

2-) Layer 0 Pixel Format to RGB565

3-) Display Type to RGB565

4-) DMA2D Color Mode to RGB565

 

So... I changed everything that shows RGB888 to RGB565 in cubeMX but the result is not good.

Is there any person that can help and has deep knowledge about changing color depth for STM32H747I-DISCO?

I really need support for this problem. Thank you!

TouchGFX your point 1 and 2 must equal. Points 3,4 is irelevant . Point 3 can be used to speed up framerate.

But primary you need understand , that change somethink in MX dont reconfigure your display.

BSP driver code for display send commands to LCD controller before start show image and here you need setup equal as point 3.

Gökhan
Associate II

Thank you for your answers.

As your suggestion, I cancelled point 3 and point 4. Then I found LCD configuration line in the main.c ( in the MX_LTDC_Init()). I changed

OTM8009A_Init(&OTM8009AObj ,OTM8009A_FORMAT_RGB888, OTM8009A_ORIENTATION_LANDSCAPE)

to 

OTM8009A_Init(&OTM8009AObj ,OTM8009A_FORMAT_RGB565, OTM8009A_ORIENTATION_LANDSCAPE)

 

To summarize, I changed ;

1-) TouchGFX Framebuffer Pixel Format to RGB565

2-) Layer 0 Pixel Format to RGB565

3-) OTM8009A_Init parameter to OTM8009A_FORMAT_RGB565

 

Unfortunately, it didn't work. Am I missing something?

9.jpg

In CubeMX check DSIHOST -> Color coding if not already. If didn't help, maybe try disable DMA2D for now - I'm just guessing.

I disabled DMA2D but no change :( Should I do something for LCD pins?

When you switch OTM to 565 same change need point 3. And ofcourse you check if in OTM code 565 change realy somethink.