Skip to main content
MNapi
Senior II
March 3, 2024
Question

Why RGB888 displays as black and white only

  • March 3, 2024
  • 1 reply
  • 2696 views

I followed the example in article AN4861 where STM explains how to setup RGB565

all is working fine but when I switch to RGB888 I get only white and black

pic4.png

I use the image converter LCD-Image-Converter-20161012 tool explained in the article

pic1.png

 

pic2.png

 

pic3.png

 

the preview show color picture like all is setup right but still I get black and white

 

pLayerCfg.WindowX0 = 0;
pLayerCfg.WindowX1 = 568;
pLayerCfg.WindowY0 = 0;
pLayerCfg.WindowY1 = 320;
pLayerCfg.PixelFormat = LTDC_PIXEL_FORMAT_RGB888;
pLayerCfg.Alpha = 255;
pLayerCfg.Alpha0 = 0;
pLayerCfg.BlendingFactor1 = LTDC_BLENDING_FACTOR1_CA;
pLayerCfg.BlendingFactor2 = LTDC_BLENDING_FACTOR2_CA;
pLayerCfg.FBStartAdress = (uint32_t)&image_568x320;
pLayerCfg.ImageWidth = 568;
pLayerCfg.ImageHeight = 320;
pLayerCfg.Backcolor.Blue = 0;
pLayerCfg.Backcolor.Green = 0;
pLayerCfg.Backcolor.Red = 255;

 

does anybody know what the problem is with RGB888 ?

This topic has been closed for replies.

1 reply

MM..1
Chief III
March 3, 2024

Are you sure you replace right c image file with new , and too priority have your LCD config . Is display connected 24bit data?

MNapi
MNapiAuthor
Senior II
March 3, 2024

this is new image generated in RGB888 format, the image contains new RGB888 generated format. All pins R0-R7, G0-G7,B0-B7 connected, all 24 pins plus signal pins.

When you generate code for RGB888 in CubeMX, it assigns 24 pins plus signal pins. All is connected.

Old RGB565 image wouldn't display, it would be distorted. So it wouldn't look like on the first picture. If you were familiar with RGB display this is something you would know.

MM..1
Chief III
March 3, 2024

I write about you show only layer config. Layer dont define result on display. Master is LTDC config.

Next i ask are you sure you compile into flash new image...

Im familiar and too with MCU code do what you write into code...

Try show part of image src file generated ...