cancel
Showing results for 
Search instead for 
Did you mean: 

STM32f429 +TFT 1024 x600

ASSAAD.ASSAAD
Associate II
Posted on January 25, 2018 at 16:26

Hello All 

I am sorry to disturb you all ; I am trying to fill the lcd structure with the right values but I think I have problem in understanding it 

please could you help me ? 

and I see that they are flickers on the LCD what could be the problem ? 

here the link for the lcd data sheet 

https://img.ozdisan.com/ETicaret_Dosya/475075_773619.pdf

 

here is my test code 

void LCD_Config(void)

{

/* LTDC Initialization -------------------------------------------------------*/

/* Polarity configuration */

/* Initialize the horizontal synchronization polarity as active low */

hltdc_F.Init.HSPolarity = LTDC_HSPOLARITY_AL;

/* Initialize the vertical synchronization polarity as active low */

hltdc_F.Init.VSPolarity = LTDC_VSPOLARITY_AL;

/* Initialize the data enable polarity as active low */

hltdc_F.Init.DEPolarity = LTDC_DEPOLARITY_AL;

/* Initialize the pixel clock polarity as input pixel clock */

hltdc_F.Init.PCPolarity = LTDC_PCPOLARITY_IPC;

/* Timing configuration */

/* Horizontal synchronization width = Hsync - 1 */

hltdc_F.Init.HorizontalSync = 139;//40;

/* Vertical synchronization height =19;// Vsync - 1 */

hltdc_F.Init.VerticalSync = 19;

/* Accumulated horizontal back porch = Hsync + HBP - 1 */

hltdc_F.Init.AccumulatedHBP = 160;

/* Accumulated vertical back porch = Vsync + VBP - 1 */

hltdc_F.Init.AccumulatedVBP = 20;

/* Accumulated active width = Hsync + HBP + Active Width - 1 */

hltdc_F.Init.AccumulatedActiveH = 632;

/* Accumulated active height = Vsync + VBP + Active Heigh - 1 */

hltdc_F.Init.AccumulatedActiveW =1340;// 522;

/* Total height = Vsync + VBP + Active Heigh + VFP - 1 */

hltdc_F.Init.TotalHeigh = 634;//285;

/* Total width = Hsync + HBP + Active Width + HFP - 1 */

hltdc_F.Init.TotalWidth = 1342;//524;

//---

/* Initialize the LCD pixel width and pixel height */

hltdc_eval.LayerCfg->ImageWidth = AMPIRE480272_WIDTH;

hltdc_eval.LayerCfg->ImageHeight = AMPIRE480272_HEIGHT;

/* Configure R,G,B component values for LCD background color */

hltdc_F.Init.Backcolor.Blue = 0;

hltdc_F.Init.Backcolor.Green = 0;

hltdc_F.Init.Backcolor.Red = 0;

hltdc_F.Instance = LTDC;

/* Layer1 Configuration ------------------------------------------------------*/

/* Windowing configuration */

/* In this case all the active display area is used to display a picture then :

Horizontal start = horizontal synchronization + Horizontal back porch = 43

Vertical start = vertical synchronization + vertical back porch = 12

Horizontal stop = Horizontal start + window width -1 = 43 + 480 -1

Vertical stop = Vertical start + window height -1 = 12 + 272 -1 */

pLayerCfg.WindowX0 = 0;

pLayerCfg.WindowX1 = 1024;

pLayerCfg.WindowY0 = 0;

pLayerCfg.WindowY1 = 600;

Thank you inadvanced 

0 REPLIES 0