cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F746 Custom Board Touch Screen Sync issue

q123w123e123qweqwe
Associate III

Hi,

I'm working on a Touch Screen project and using STM32F746 MCU. I have an sync issue I couldn't solved yet. Here is video: https://www.youtube.com/watch?v=0T0yGYekXSE

My LTDC parameters are the same with datasheet I think there is some timing problem but I don't know what to do. Here are datasheet and my LTDC config codes.

Datasheet: https://cdn.ozdisan.com/ETicaret_Dosya/493618_9666178.pdf

LTDC Code:

/* USER CODE END LTDC_Init 1 */
  hltdc.Instance = LTDC;
  hltdc.Init.HSPolarity = LTDC_HSPOLARITY_AH;
  hltdc.Init.VSPolarity = LTDC_VSPOLARITY_AH;
  hltdc.Init.DEPolarity = LTDC_DEPOLARITY_AH;
  hltdc.Init.PCPolarity = LTDC_PCPOLARITY_IPC;
  hltdc.Init.HorizontalSync = 0;
  hltdc.Init.VerticalSync = 0;
  hltdc.Init.AccumulatedHBP = 46;
  hltdc.Init.AccumulatedVBP = 23;
  hltdc.Init.AccumulatedActiveW = 846;
  hltdc.Init.AccumulatedActiveH = 503;
  hltdc.Init.TotalWidth = 1200;
  hltdc.Init.TotalHeigh = 650;
  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_RGB565;
  pLayerCfg.Alpha = 255;
  pLayerCfg.Alpha0 = 0;
  pLayerCfg.BlendingFactor1 = LTDC_BLENDING_FACTOR1_CA;
  pLayerCfg.BlendingFactor2 = LTDC_BLENDING_FACTOR2_CA;
  pLayerCfg.FBStartAdress = 0xC0000000;
  pLayerCfg.ImageWidth = 800;
  pLayerCfg.ImageHeight = 480;
  pLayerCfg.Backcolor.Blue = 0;
  pLayerCfg.Backcolor.Green = 0;
  pLayerCfg.Backcolor.Red = 0;

4 REPLIES 4
MMoon.1
Associate II

Do you mean the flickering of the display?

Yes, the flickering.

Have you checked with a scope that you have the expected timings for pixel clock, vsync, hsync

I couldn't checked and can't right now but when I lower the LCD frequency (25MHz to 18Mhz) it worked. But now I added modal window and it happend again. It's like I'm losing some data.