STM32 LTDC and 7-inch display: part 1

Good day.





It's about connecting an AT070TN94 parallel display to an STM32H743 controller. And although there is a lot of information on this topic on the Internet, when creating my device, I periodically had certain questions, the answers to which could not be found. I write primarily for beginners, and I invite pros to read for advice and reasoned criticism (the first article, after all).





LTDC. , TouchGFX, .





:

  • , , STM32.





  • , AT070TN90/92/94. . ( 1000-1500 ).





  • , , - . , SDRAM , W9812G6KH.





  • LCD . , , 4 , 3.3 . TPS65100.





  • . 5 -> 9 , . -. TPS61040DBVR.





  • . 50 0.5 . "FFC FPC 50 pin" .





  • , , . .





, . , HSYNC, VSYNC, CLK DE. . , Application note AN4861 :





?





VSYNC, , , . CLK, VBP. , HSYNC, , (1 CLK = 1 ). ( ), HSYNC, , + VFP, . , VSYNC, .





DE? , RGB ( ). , , , , DE CLK, . 1 0 MODE . LTDC , : H-Vsync, DE.





TPS61040DBVR TPS65100, LCD . , . , - . ENABLE, . , ENABLE . , ?





LTDC

CubeMX. , + Application note AN4861 . . HSYNC.





2 .





H blanking ( 1) HBP ( 2). , ST , , , .





LTDC, ( RGB888), .





. (HS pulse width, 1) . 18. . HBP = H blanking - HS pulse width. Active width = . HFP = H front porch ( 1).





. ? , .





Background color , . , .





LTDC 33,3 ( 1) PLL .





Layer settings.





1 ( , ). Horizontal start = HSYNC width + HBP . . 0, . Vertical start . (RGB88). Frame Buffer Start Address - . ( , , ) FMC, . SPI flash, - . .





GPIO settings . , .





, RESET .





?

. - . , - , . , . , - SDRAM_Initialization_Sequence? , ?





RESET? , LTDC, . - .





, Background color, - memset:





memset(FRAMEBUFFER_ADDR, 0x00FFFFFF, FRAMEBUFFER_SIZE);
      
      



DMA2D ( , LTDC)





DMA2D

:





void FillScreen(uint32_t color)
{
  hdma2d.Init.Mode = DMA2D_R2M;
  hdma2d.Init.OutputOffset = 0;
  if(HAL_DMA2D_Init(&hdma2d) == HAL_OK)
  {
    if (HAL_DMA2D_Start(&hdma2d, color, FRAMEBUFFER_ADDR,
    hltdc.LayerCfg[0].ImageWidth, hltdc.LayerCfg[0].ImageHeight) == HAL_OK)
    {
      HAL_DMA2D_PollForTransfer(&hdma2d, 10);
    }
  }
}
      
      



, - , (, , ). - - . , .





A repository with a minimal project is here . There is also a pdf with a diagram.








All Articles