cancel
Showing results for 
Search instead for 
Did you mean: 

Touch Display getting flicker when data is getting updated through TouchGFX task

JJhin.1
Senior II

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.

Nor.jpeg

but when i starts updating digital clock in void screenView::handleTickEvent() then my display starts flickering and white lines appearing on display.

FL.jpegFL2.jpeg

 

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.

16 REPLIES 16
JJhin.1
Senior II

@Muddassir_AZMI  no progress :)

JJhin.1
Senior II

@INaee.1  would you like help me ,to resolve this issue?

INaee.1
Senior

Hi @JJhin.1 
I have been quite busy since past few months and was not following the forum.

I was facing similar issue with one of my experiment.

by reducing the LTDC frequency , I managed to control the flickering during update of the display.

here is one of my experiment with Google Nexus 7 inch display with 1280x800 resolution. 

 

WhatsApp Image 2025-01-30 at 11.28.09_177f402c.jpg

WhatsApp Image 2025-02-02 at 23.29.36_12a05473.jpg

The first screen is connected with ComAp's Inteli-compact NT over modbus RTU and my screen has more then 30 parameters , updating in real time. also the icons are changing colors as I programmed.

My custom designed board is similar as below.

20230811_104211.jpg

here is one of the video of my similar experiment with Samsung Tab 10.1 inch 1280x800 tft with LVDS interface.

https://www.youtube.com/watch?v=6nlMZ3EMQXA

regards

I.N

 

JJhin.1
Senior II

hii @INaee.1  i already tried 20 MHZ to 70 MHZ LTDC frequencies best output but with less flickering im getting at 37.5MHZ  as im increasing the frequency flickering increases even more.

Hi ,

which LVDS serializer you have used ?

I.N

JJhin.1
Senior II

im using direct RGB parallel interface. im doubting on display, beacuse colors of image are not apearing same as compare to ToucGFX designer image. e.g. in TouchGFX the image is dark Blue with Gray shades, but on LCD it apears completly light blue without gary shades.

 

im searching alternative display with same size and same pin mapped connector.

JJhin.1
Senior II

Im happy to inform you guys that my issue got resolved!..

There is some issue present in the  External crystal Frequency (HSE) , Instead of HSE i taken HSI and its starts working correctly.