Buenos días.
Se trata de conectar una pantalla paralela AT070TN94 a un controlador STM32H743. Y aunque hay mucha información sobre este tema en Internet, al crear mi dispositivo, periódicamente tenía ciertas preguntas, cuyas respuestas no se podían encontrar. Escribo principalmente para principiantes e invito a los profesionales a leer en busca de consejos y críticas razonadas (el primer artículo, después de todo).
LTDC. , TouchGFX, .
:
, , STM32.
, AT070TN90/92/94. . ( 1000-1500 ).
, , - . , SDRAM , W9812G6KH.
LCD . ,
. 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);
}
}
}
, - , (, , ). - - . , .
Un repositorio con un proyecto mínimo está aquí . También hay un pdf con un diagrama.