cancel
Showing results for 
Search instead for 
Did you mean: 

[STM32F767ZG] LTDC abnormal display and signal with RGB888 format on RGB666 mode

JHuan.9
Associate

Hello ST team,

I have a project using STM32F767ZG with LTDC for LCM (LCD module).

Currently, I encounter an issue for display picture on LCM.

Could you help me to figure out this issue?

0690X000009YDb4QAG.jpg

In my HW design, use LTDC R[2:7] , G[2:7] and B[2:7] for LCM.

I generated a pure blue (B = 0xFF) picture as below table for ST boot screen.

pLayerCfg.FBStartAdress = (uint32_t *)image_data_sample_320_480_blue;

0690X000009YDaaQAG.png

(See sample_320_480_blue.h)

However, with above table, I saw RGB888 and RGB656 (just see different) both display not well.0690X000009YDakQAG.png

For further check on RGB888 case, I should only see signal running on LTDC B[2:7] pins

supposedly. But, after check each PINs (R[2:7] , G[2:7] and B[2:7]), I saw all RGB signal running on LTDC interface.

0690X000009YDapQAG.png

0690X000009YDazQAG.png

And, here is my LTDC init code.

static void MX_LTDC_Init(void)

{

 /* USER CODE BEGIN LTDC_Init 0 */

 /* USER CODE END LTDC_Init 0 */

 LTDC_LayerCfgTypeDef pLayerCfg = {0};

 /* USER CODE BEGIN LTDC_Init 1 */

 /* USER CODE END LTDC_Init 1 */

 hltdc.Instance = LTDC;

 hltdc.Init.HSPolarity = LTDC_HSPOLARITY_AL;

 hltdc.Init.VSPolarity = LTDC_VSPOLARITY_AL;

 hltdc.Init.DEPolarity = LTDC_DEPOLARITY_AH;

 hltdc.Init.PCPolarity = LTDC_PCPOLARITY_IPC;

 hltdc.Init.HorizontalSync = 49;

 hltdc.Init.VerticalSync = 3;

  hltdc.Init.AccumulatedHBP = 99;

 hltdc.Init.AccumulatedVBP = 7;

  hltdc.Init.AccumulatedActiveW = 419;

  hltdc.Init.AccumulatedActiveH = 487;

  hltdc.Init.TotalWidth = 457;

  hltdc.Init.TotalHeigh = 495;

  hltdc.Init.Backcolor.Blue = 0;

  hltdc.Init.Backcolor.Green = 0;

  hltdc.Init.Backcolor.Red = 0;

  if (HAL_LTDC_Init(&hltdc) != HAL_OK)

 {

   Error_Handler();

 }

 pLayerCfg.WindowX0 = 0;

  pLayerCfg.WindowX1 = 320;

  pLayerCfg.WindowY0 = 0;

  pLayerCfg.WindowY1 = 480;

  pLayerCfg.PixelFormat = LTDC_PIXEL_FORMAT_RGB888;

 pLayerCfg.Alpha = 255;

  pLayerCfg.Alpha0 = 0;

  pLayerCfg.BlendingFactor1 = LTDC_BLENDING_FACTOR1_PAxCA;

 pLayerCfg.BlendingFactor2 = LTDC_BLENDING_FACTOR2_PAxCA;

 pLayerCfg.FBStartAdress = (uint32_t *)image_data_sample_320_480_blue;

 pLayerCfg.ImageWidth = 320;

  pLayerCfg.ImageHeight = 480;

  pLayerCfg.Backcolor.Blue = 0;

 pLayerCfg.Backcolor.Green = 0;

 pLayerCfg.Backcolor.Red = 0;

 if (HAL_LTDC_ConfigLayer(&hltdc, &pLayerCfg, 0) != HAL_OK)

 {

   Error_Handler();

 }

Thanks,

Jim

0 REPLIES 0