AnsweredAssumed Answered

STM32F7 interfacing 7" Rocktech LCD problem

Question asked by vugs.michel.001 on Jan 30, 2016
Latest reply on Feb 3, 2016 by vugs.michel.001
Hello Guys,

I've currently designed a board with an STM32F756IGT6. Connected to the board is an 7" LCD from Rocktech. Same manufacturer as the 4.3" LCD's that can be found on the stm32F7 discovery boards. 

I'm now trying to get the LCD to work. It's connected with a 18 bit RGB interface and i'm using the Sync connection mode. Not the DE connection. I have the display partially working because I can set background colors successful. 

Now I was trying to put some pixels in the screen to verify the timing is correct. I adapted the STEMWIN hello world example from the discovery board to my board and tried to show the helllo world. But all I get is some random lines. I think the timing for the back porch etc is not correct. 

In the datasheet of the LCD I find these parameters: 
lcd_timing.PNG

If i'm correct then these should be the settings for the LTDC controller:

void MX_LTDC_Init(void)
{
  LTDC_LayerCfgTypeDef pLayerCfg;
  LTDC_LayerCfgTypeDef pLayerCfg1;
 
  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 = 1;
  hltdc.Init.VerticalSync = 1;
  hltdc.Init.AccumulatedHBP = 45;
  hltdc.Init.AccumulatedVBP = 22;
  hltdc.Init.AccumulatedActiveW = 845;
  hltdc.Init.AccumulatedActiveH = 502;
  hltdc.Init.TotalWidth = 1055;
  hltdc.Init.TotalHeigh = 634;
  hltdc.Init.Backcolor.Blue = 255;
  hltdc.Init.Backcolor.Green = 0;
  hltdc.Init.Backcolor.Red = 0;
  HAL_LTDC_Init(&hltdc);
 
  pLayerCfg.WindowX0 = 0;
  pLayerCfg.WindowX1 = 0;
  pLayerCfg.WindowY0 = 0;
  pLayerCfg.WindowY1 = 0;
  pLayerCfg.PixelFormat = LTDC_PIXEL_FORMAT_ARGB8888;
  pLayerCfg.Alpha = 0;
  pLayerCfg.Alpha0 = 0;
  pLayerCfg.BlendingFactor1 = LTDC_BLENDING_FACTOR1_CA;
  pLayerCfg.BlendingFactor2 = LTDC_BLENDING_FACTOR2_CA;
  pLayerCfg.FBStartAdress = 0;
  pLayerCfg.ImageWidth = 0;
  pLayerCfg.ImageHeight = 0;
  pLayerCfg.Backcolor.Blue = 0;
  pLayerCfg.Backcolor.Green = 0;
  pLayerCfg.Backcolor.Red = 0;
  HAL_LTDC_ConfigLayer(&hltdc, &pLayerCfg, 0);
 
  pLayerCfg1.WindowX0 = 0;
  pLayerCfg1.WindowX1 = 0;
  pLayerCfg1.WindowY0 = 0;
  pLayerCfg1.WindowY1 = 0;
  pLayerCfg1.PixelFormat = LTDC_PIXEL_FORMAT_ARGB8888;
  pLayerCfg1.Alpha = 0;
  pLayerCfg1.Alpha0 = 0;
  pLayerCfg1.BlendingFactor1 = LTDC_BLENDING_FACTOR1_CA;
  pLayerCfg1.BlendingFactor2 = LTDC_BLENDING_FACTOR2_CA;
  pLayerCfg1.FBStartAdress = 0;
  pLayerCfg1.ImageWidth = 0;
  pLayerCfg1.ImageHeight = 0;
  pLayerCfg1.Backcolor.Blue = 0;
  pLayerCfg1.Backcolor.Green = 0;
  pLayerCfg1.Backcolor.Red = 0;
  HAL_LTDC_ConfigLayer(&hltdc, &pLayerCfg1, 1);

Could someone verify or check if these are the right settings? Or maybe someone has already used this kind of screen. Also is there a way to simply put some pixels on the screen? to verify everything is right?

Thank you verify much!



Outcomes