AnsweredAssumed Answered

STM32F429 DMA2D 16bit Configuration

Question asked by aksoy.mustafa on Sep 10, 2015
Latest reply on Sep 16, 2015 by 68516

I am working on Hal library. I developed new board for my project. There is a 4.3" TFT.
I use STM32F429_EVAL board  example software. SDRAM and TFT are ok. They are working without problem. However, when i use fillrect or ClearLCD functions, they dont work because of DMA2D library. Because this library consist of 24bit color format. I tried but i could not handle it. 
Shortly, How can i change DMA2D library as 16bit colour format.

I edited some parameter. For example , I edited RGB_565, 

void BSP_LCD_DrawHLine(uint16_t Xpos, uint16_t Ypos, uint16_t Length) {
  uint32_t  Xaddress = 0;
  /* Get the line address */
  //Xaddress = (hltdc_eval.LayerCfg[ActiveLayer].FBStartAdress) + 4*(BSP_LCD_GetXSize()*Ypos + Xpos); // original
  Xaddress = (hltdc_eval.LayerCfg[ActiveLayer].FBStartAdress) + 2 * (BSP_LCD_GetXSize()*Ypos + Xpos); // I changed as a 16bit
  /* Write line */
  LL_FillBuffer(ActiveLayer, (uint32_t *)Xaddress, Length, 1, 0, DrawProp[ActiveLayer].TextColor);

  tmp1 = pdata & DMA2D_OCOLR_ALPHA_1;
    tmp2 = pdata & DMA2D_OCOLR_RED_2;
    tmp3 = pdata & DMA2D_OCOLR_GREEN_2;
    tmp4 = pdata & DMA2D_OCOLR_BLUE_2;

Can you help me anyone.