2020-05-22 02:50 PM
Hello,
I am building a custom board based on the STM32F746's discovery.
I have already used the STM32CubeIDE 1.1.0 with TouchGFX 4.12.3 om discovery and everything is working fine.
Custom board has the same hardware with discovery but we are using different TFT screen (attached PDF).
The TFT on my board displays:
I am not sure about the LTDC parameters based on the new TFT. I have set the below:
void MX_LCD_Init(void)
{
LTDC_LayerCfgTypeDef pLayerCfg;
/* De-Initialize LTDC */
HAL_LTDC_DeInit(&hltdc);
/* Configure LTDC */
hltdc.Instance = LTDC;
hltdc.Init.HSPolarity = LTDC_HSPOLARITY_AL;
hltdc.Init.VSPolarity = LTDC_VSPOLARITY_AL;
hltdc.Init.DEPolarity = LTDC_DEPOLARITY_AL;
hltdc.Init.PCPolarity = LTDC_PCPOLARITY_IPC;
hltdc.Init.HorizontalSync = 49;
hltdc.Init.VerticalSync = 4;
hltdc.Init.AccumulatedHBP = 89;
hltdc.Init.AccumulatedVBP = 33;
hltdc.Init.AccumulatedActiveW = 889;
hltdc.Init.AccumulatedActiveH = 513;
hltdc.Init.TotalWidth = 929;
hltdc.Init.TotalHeigh = 526;
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 = 800;
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 = 0xC0000000;
pLayerCfg.ImageWidth = 480;
pLayerCfg.ImageHeight = 272;
pLayerCfg.Backcolor.Blue = 0;
pLayerCfg.Backcolor.Green = 0;
pLayerCfg.Backcolor.Red = 0;
if (HAL_LTDC_ConfigLayer(&hltdc, &pLayerCfg, 0) != HAL_OK)
{
Error_Handler( );
}
HAL_LTDC_SetPitch(&hltdc, 800, 0);
}
Could someone help me or advise?
2020-05-27 08:12 AM
Martin,
I opened the below thread to continue with this issue on RGB888: