STM32F756G-Eval LCD Pixel Format
- November 28, 2016
- 3 replies
- 1188 views
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;
&sharpdefine LCD_COLOR_BLUE ((uint16_t)0x001F)
&sharpdefine LCD_COLOR_GREEN ((uint16_t)0x07E0) &sharpdefine LCD_COLOR_RED ((uint16_t)0xF800) &sharpdefine LCD_COLOR_CYAN ((uint16_t)0x07FF) &sharpdefine LCD_COLOR_MAGENTA ((uint16_t)0xF81F) &sharpdefine LCD_COLOR_YELLOW ((uint16_t)0xFFE0) &sharpdefine LCD_COLOR_LIGHTBLUE ((uint16_t)0x841F) &sharpdefine LCD_COLOR_LIGHTGREEN ((uint16_t)0x87F0) &sharpdefine LCD_COLOR_LIGHTRED ((uint16_t)0xFC10) &sharpdefine LCD_COLOR_LIGHTCYAN ((uint16_t)0x87FF) &sharpdefine LCD_COLOR_LIGHTMAGENTA ((uint16_t)0xFC1F) &sharpdefine LCD_COLOR_LIGHTYELLOW ((uint16_t)0xFFF0) &sharpdefine LCD_COLOR_DARKBLUE ((uint16_t)0x0010) &sharpdefine LCD_COLOR_DARKGREEN ((uint16_t)0x0400) &sharpdefine LCD_COLOR_DARKRED ((uint16_t)0x8000) &sharpdefine LCD_COLOR_DARKCYAN ((uint16_t)0x0410) &sharpdefine LCD_COLOR_DARKMAGENTA ((uint16_t)0x8010) &sharpdefine LCD_COLOR_DARKYELLOW ((uint16_t)0x8400) &sharpdefine LCD_COLOR_WHITE ((uint16_t)0xFFFF) &sharpdefine LCD_COLOR_LIGHTGRAY ((uint16_t)0xDE7B) &sharpdefine LCD_COLOR_GRAY ((uint16_t)0x8410) &sharpdefine LCD_COLOR_DARKGRAY ((uint16_t)0x4208) &sharpdefine LCD_COLOR_BLACK ((uint16_t)0x0000) &sharpdefine LCD_COLOR_BROWN ((uint16_t)0xA985) &sharpdefine LCD_COLOR_ORANGE ((uint16_t)0xFD00) &sharpdefine 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.
#stm32f756g-eval