Skip to main content
Sany
Associate III
April 6, 2025
Solved

STM32H743 LTDC Problem

  • April 6, 2025
  • 1 reply
  • 1057 views

Hey,

I have a confusing error, i have a Riverdi 7" TFT Panel (https://download.riverdi.com/RVT70HSTNWC00-B/DS_RVT70HSTNWC00-B_Rev.1.2.pdf)

Actually my LTDC Init is this:

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_AL;
 hltdc.Init.PCPolarity = LTDC_PCPOLARITY_IPC;
 hltdc.Init.HorizontalSync = 0;
 hltdc.Init.VerticalSync = 0;
 hltdc.Init.AccumulatedHBP = 160;
 hltdc.Init.AccumulatedVBP = 23;
 hltdc.Init.AccumulatedActiveW = 1184;
 hltdc.Init.AccumulatedActiveH = 623;
 hltdc.Init.TotalWidth = 1344;
 hltdc.Init.TotalHeigh = 635;
 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 = 1024;
 pLayerCfg.WindowY0 = 0;
 pLayerCfg.WindowY1 = 600;
 pLayerCfg.PixelFormat = LTDC_PIXEL_FORMAT_RGB888;
 pLayerCfg.Alpha = 255;
 pLayerCfg.Alpha0 = 255;
 pLayerCfg.BlendingFactor1 = LTDC_BLENDING_FACTOR1_CA;
 pLayerCfg.BlendingFactor2 = LTDC_BLENDING_FACTOR2_CA;
 pLayerCfg.FBStartAdress = 0xC0000000;
 pLayerCfg.ImageWidth = 1024;
 pLayerCfg.ImageHeight = 600;
 pLayerCfg.Backcolor.Blue = 255;
 pLayerCfg.Backcolor.Green = 0;
 pLayerCfg.Backcolor.Red = 0;
 if (HAL_LTDC_ConfigLayer(&hltdc, &pLayerCfg, 0) != HAL_OK)
 {
 Error_Handler();
 }
 /* USER CODE BEGIN LTDC_Init 2 */

 /* USER CODE END LTDC_Init 2 */

}

the Layer0 background is set to blue, if my WindowsX1 = 1024, my background shows no blue screen, but only gray..
if i decrease WindowX1 to 500, then my screen is half blue, if i change WindowsX1 to 0 then my Screen are complete blue..

whats wrong? my LCD is in 18-Bit mode (RGB666) and V/HSync and the DCLK of the display is 50 MHZ, Pixel Format is set to RGB888.

my external sdram works fine, here is the test result:

 -------------------- SDRAM 16 bit access -------------------
Write 16-bit data , size: 32 MB, elapsed time: 825 ms, write speed: 38.79 MB/s
Read 16-bit data, size: 32 MB, elapsed time: 3161 ms, read speed: 10.12 MB/s
 -------------------- 16 Bit data validation -------------------
SDRAM 16-bit data validation pass!

 

Best answer by Sany

Hello Gaetan,

 

Thank you, i contacted the guys at Riverdi, and they help me.
The Settings for my TFT was a little bit wrong, after the changed, touchGFX worked :)

 

Regards,

Daniel

1 reply

GaetanGodart
Technical Moderator
April 9, 2025

Hello @Sany ,

 

It looks like expected behavior.
Meaning that the blue background is there is nothing happens.

When you have X1 at 1024, the transfer happens so you transfer the framebuffer and when you reduce X1 to 0, nothing gets transferred so only the default blue background is showing.

Have you enabled TouchGFX? What is the content of your framebuffer?

Can you change some colors and see how your display behaves?

 

Regards,

Sany
SanyAuthorBest answer
Associate III
April 10, 2025

Hello Gaetan,

 

Thank you, i contacted the guys at Riverdi, and they help me.
The Settings for my TFT was a little bit wrong, after the changed, touchGFX worked :)

 

Regards,

Daniel

mƎALLEm
Technical Moderator
April 10, 2025

Please share Reverdi settings before accepting the solution.

This to ensure that someone else could find the solution if he fall into the same issue. 
Thank you.

"To give better visibility on the answered topics, please click on ""Accept as Solution"" on the reply which solved your issue or answered your question."