cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure properly a LCD screen?

GMeur
Senior II

Hello,

I'm having difficulties setting up the LTDC properties in the HW_Init.cpp file for my specific LCD screen and thought that someone here could potentially help me. The lines I have to configure are the followings:

hltdc.Init.HorizontalSync = 20;
    hltdc.Init.VerticalSync = 10;
    hltdc.Init.AccumulatedHBP = 210; //Acculumutaled Horizontal Back Porsh
    hltdc.Init.AccumulatedVBP = 20; //Accumulated Vertical Back Porsh
    hltdc.Init.AccumulatedActiveW = 1010;
    hltdc.Init.AccumulatedActiveH = 502;
    hltdc.Init.TotalWidth = 1056;
    hltdc.Init.TotalHeigh = 525 ;

And here are the characteristics of my LCD screen:

0690X000009YjAZQA0.png

I struggle 'making the conversion' between the code and the table in the datasheet, considering the naming is different and that a range of values may be used for any given parameter (which one to choose then?).

I know I've to modify this line too:

HAL_LTDC_SetPitch(&hltdc, 800, 0);

(the 800 value is not correct) but have no idea of what it corresponds to and haven't found a lot of ressources online about how to calculate this value.

I'm using the board STM32F746G with the default clock frequency.

Any help is more than appreciated.

This discussion is locked. Please start a new topic to ask your question.
0 REPLIES 0