2025-02-25 10:15 PM
Hello Friends.
Now i have started working on bigger display with TouchGFX Custom Boards. Im using 10.1 inch 1024x600 touch display. using QUADSPI,SDRAM, FMC and LTDC.
Through TouchGFX Designer i taken one backgoround image, one Text Area buffer and one Digital clock. when im not updating digital clock data and text area im getting proper display.
but when i starts updating digital clock in void screenView::handleTickEvent() then my display starts flickering and white lines appearing on display.
my LTDC configuration:
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 = 40;
hltdc.Init.VerticalSync = 9;
hltdc.Init.AccumulatedHBP = 200;
hltdc.Init.AccumulatedVBP = 29;
hltdc.Init.AccumulatedActiveW = 1224;
hltdc.Init.AccumulatedActiveH = 629;
hltdc.Init.TotalWidth = 1384;
hltdc.Init.TotalHeigh = 659;
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 = 0;
pLayerCfg.BlendingFactor1 = LTDC_BLENDING_FACTOR1_PAxCA;
pLayerCfg.BlendingFactor2 = LTDC_BLENDING_FACTOR2_PAxCA;
pLayerCfg.FBStartAdress = 0xD0000000;
pLayerCfg.ImageWidth = 1024;
pLayerCfg.ImageHeight = 600;
pLayerCfg.Backcolor.Blue = 0;
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 */
}
my FMC configuration:
void MX_FMC_Init(void)
{
/* USER CODE BEGIN FMC_Init 0 */
/* USER CODE END FMC_Init 0 */
FMC_SDRAM_TimingTypeDef SdramTiming = {0};
/* USER CODE BEGIN FMC_Init 1 */
/* USER CODE END FMC_Init 1 */
/** Perform the SDRAM1 memory initialization sequence
*/
hsdram1.Instance = FMC_SDRAM_DEVICE;
/* hsdram1.Init */
hsdram1.Init.SDBank = FMC_SDRAM_BANK2;
hsdram1.Init.ColumnBitsNumber = FMC_SDRAM_COLUMN_BITS_NUM_8;
hsdram1.Init.RowBitsNumber = FMC_SDRAM_ROW_BITS_NUM_12;
hsdram1.Init.MemoryDataWidth = FMC_SDRAM_MEM_BUS_WIDTH_16;
hsdram1.Init.InternalBankNumber = FMC_SDRAM_INTERN_BANKS_NUM_4;
hsdram1.Init.CASLatency = FMC_SDRAM_CAS_LATENCY_3;
hsdram1.Init.WriteProtection = FMC_SDRAM_WRITE_PROTECTION_DISABLE;
hsdram1.Init.SDClockPeriod = FMC_SDRAM_CLOCK_PERIOD_2;
hsdram1.Init.ReadBurst = FMC_SDRAM_RBURST_ENABLE;
hsdram1.Init.ReadPipeDelay = FMC_SDRAM_RPIPE_DELAY_1;
/* SdramTiming */
SdramTiming.LoadToActiveDelay = 2;
SdramTiming.ExitSelfRefreshDelay = 7;
SdramTiming.SelfRefreshTime = 4;
SdramTiming.RowCycleDelay = 6;
SdramTiming.WriteRecoveryTime = 2;
SdramTiming.RPDelay = 2;
SdramTiming.RCDDelay = 2;
if (HAL_SDRAM_Init(&hsdram1, &SdramTiming) != HAL_OK)
{
Error_Handler( );
}
/* USER CODE BEGIN FMC_Init 2 */
FMC_Bank1_R->BTCR[0] &= ~FMC_BCRx_MBKEN;
BSP_SDRAM_Init();
/* USER CODE END FMC_Init 2 */
}
i dont have a idea whats going wrong with this display. if any one knows please help to resolve this issue.
2025-02-25 10:49 PM - edited 2025-02-25 10:51 PM
If yours LTDC settings for display are correct, what about LTDC clock ? For 1024x600 you need at least freq around 50-60Mhz - see example bellow - Riverdi 10.1" uses 57.92Mhz
2025-02-25 11:01 PM
hi @PMerv.1 thanks for replying. im using waveshares 10.1 Capacitive LCD Touch(D) display. i tried LTDC frquency from 20 MHz to 45 MHz its showing same. but when im increasing frequency above 45MHz its flickring even more. max frequnecy i tried is 59MHZ.
2025-02-25 11:52 PM
Strange, 745-DISCO (4.3" 480x272) uses LTDC clocks around 10Mhz, same kit but 5" 800x480 already needs around 20-30Mhz. And if you have even bigger resolution, you need higher LTDC clocks in principle....
Anyway, do you have some datasheet for that kind of LCD ? Is here already some LVDS -> RGB (LTDC) converter IO (like Riverdi uses it for that big displays) ?
PS: my mistake in first reply: Riverdi 10.1 uses 1280x800 and 58Mhz, so for 1024x600 + some LTDC clock equation
2025-02-26 1:14 AM
as pr my display data sheet its supports 44.9 to 63 MHZ frequency. im refering this Data Sheet .
2025-02-26 1:34 AM - edited 2025-02-26 1:37 AM
It seems your seetings is correct, anyway try to play with h/v sync width (pdf says h: 1-140 / v:1-20) ) + LTDC clocks between 40 - 70Mhz.
+ yes, it's LVDS display, so check your LVDS -> LTDC converter circuit