AnsweredAssumed Answered

STM32F756G-Eval LCD Pixel Format

Question asked by kasapoglu.orkun on Nov 28, 2016
Latest reply on Nov 29, 2016 by kasapoglu.orkun

Hi. I'm trying to try something on LCD interface with the evaluation board. I want that the LCD module work with RGB565 interface but the colors are not correct when I set everything (or I'm thinking I set everything to RGB565).

I've changed the LCD color values from ARGB8888 to RGB565 like as;

#define LCD_COLOR_BLUE          ((uint16_t)0x001F)
#define LCD_COLOR_GREEN         ((uint16_t)0x07E0)
#define LCD_COLOR_RED           ((uint16_t)0xF800)
#define LCD_COLOR_CYAN          ((uint16_t)0x07FF)
#define LCD_COLOR_MAGENTA       ((uint16_t)0xF81F)
#define LCD_COLOR_YELLOW        ((uint16_t)0xFFE0)
#define LCD_COLOR_LIGHTBLUE     ((uint16_t)0x841F)
#define LCD_COLOR_LIGHTGREEN    ((uint16_t)0x87F0)
#define LCD_COLOR_LIGHTRED      ((uint16_t)0xFC10)
#define LCD_COLOR_LIGHTCYAN     ((uint16_t)0x87FF)
#define LCD_COLOR_LIGHTMAGENTA  ((uint16_t)0xFC1F)
#define LCD_COLOR_LIGHTYELLOW   ((uint16_t)0xFFF0)
#define LCD_COLOR_DARKBLUE      ((uint16_t)0x0010)
#define LCD_COLOR_DARKGREEN     ((uint16_t)0x0400)
#define LCD_COLOR_DARKRED       ((uint16_t)0x8000)
#define LCD_COLOR_DARKCYAN      ((uint16_t)0x0410)
#define LCD_COLOR_DARKMAGENTA   ((uint16_t)0x8010)
#define LCD_COLOR_DARKYELLOW    ((uint16_t)0x8400)
#define LCD_COLOR_WHITE         ((uint16_t)0xFFFF)
#define LCD_COLOR_LIGHTGRAY     ((uint16_t)0xDE7B)
#define LCD_COLOR_GRAY          ((uint16_t)0x8410)
#define LCD_COLOR_DARKGRAY      ((uint16_t)0x4208)
#define LCD_COLOR_BLACK         ((uint16_t)0x0000)
#define LCD_COLOR_BROWN         ((uint16_t)0xA985)
#define LCD_COLOR_ORANGE        ((uint16_t)0xFD00)
#define LCD_COLOR_TRANSPARENT   ((uint16_t)0x0000)

and I've changed also;

BSP_LCD_LayerDefaultInit(uint16_t LayerIndex, uint32_t FB_Address)

{

...

layer_cfg.PixelFormat = LTDC_PIXEL_FORMAT_RGB565;

...

}

static void LL_FillBuffer(uint32_t LayerIndex, void *pDst, uint32_t xSize, uint32_t ySize, uint32_t OffLine, uint32_t ColorIndex)

{

...

hDma2dEval.InitColorMode = DMA2D_OUTPUT_RGB565;

...

}

static void LL_ConvertLineToARGB8888(void *pSrc, void *pDst, uint32_t xSize, uint32_t ColorMode)

{

...

  hDma2dEval.Init.ColorMode = DMA2D_OUTPUT_RGB565;

...

}

but when I want to draw some white things on the screen it's drawing cyan. And the strings are not seem correctly on the screen. I'm going to add an image but now I cannot.

Thanks.

Edit: I've attached the files. I can't find anything about the LCD on the internet.

Attachments

Outcomes