2024-03-03 07:50 AM
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
I use the image converter LCD-Image-Converter-20161012 tool explained in the article
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 ?
2024-03-03 08:09 AM
Are you sure you replace right c image file with new , and too priority have your LCD config . Is display connected 24bit data?
2024-03-03 08:21 AM
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.
2024-03-03 09:04 AM - edited 2024-03-03 09:36 AM
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 ...
2024-03-03 11:44 AM
what you are saying here it does not help
if have working project why don't you show then we can compare and see that the problem is.
see the last picture, it shows part of the image file generated. but I doubt that after looking at it you can provide solution.
const uint32_t image_568x320[136320] = {
0x178c861b, 0x8d8d1682, 0x8c208096, 0x2b7a9939,
2024-03-04 09:13 AM
Simply this isnt ok as you said. Use other image for solve for example