cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F429 24 bit RGB888 mode not working

mahendrai
Associate II
Posted on November 03, 2014 at 15:41

We are facing problem with 24-bit RGB888 mode. Most of the time 2-3 LSBs of R, G and B have noise data coming out.  For some particular pattern of data like all 1s written to frame buffer the data coming out as expected with all 1s. Its working fine without any problem in RGB565 mode. Hardware problem is ruled out as the result is same on our custom board as well as STM32F429DISCOVERY. We modified the same code for RGB888 mode and below are the changes.  The MCU is STM32F429I.

/*                                                 */

/* Our LCD supports resolution 480x110 and 24-bit. */

/*                                                 */

/* Set pixel format to RGB888 */

LTDC_Layer_InitStruct.LTDC_PixelFormat   = LTDC_Pixelformat_RGB888;

/* LCD horizontal resolution 480 pixels */

LTDC_Layer_InitStruct.LTDC_CFBLineLength = ((480 * 3) + 3);

LTDC_Layer_InitStruct.LTDC_CFBPitch      = (480 * 3);

/*LCD vertical resolution 110 pixels */

LTDC_Layer_InitStruct.LTDC_CFBLineNumber = 110;

/* Fill frame buffer */

uint8_t  *framebuf = 0x20000000;

  for (index = 0x00; index < (480 * 110 * 3); index+=3) {

      framebuf[index + 0] = (uint8_t)0xAA;   // Blue

      framebuf[index + 1] = (uint8_t)0xAA;   // Green

      framebuf[index + 2] = (uint8_t)0xAA;   // Red

  }​

2 REPLIES 2
Posted on November 03, 2014 at 16:35

Dithering on? Check DEN bit in LTDC_GCR.

JW
mahendrai
Associate II
Posted on November 03, 2014 at 17:52

Thanks JW

Dithering is enabled.

LTDC_DitherCmd(ENABLE);

Is it due to dithering?