HX8238 and LTDC
Hello,
I have succesfully configured several lcd screens with stm32 MCU's, but they always been "timing-friendly" and all the typical parameters were in the datasheet. Now I'm trying to use the 3,5" LCD with HX8238 using RGB 565 connection.
Here is the datasheet:
https://www.buydisplay.com/download/ic/HX8238.pdfI have found over there typical values of dotCLK 6.5mhz, HBP 68px, HFP 20px, VBP 18lines, VFP 4lines. The Horizontal Sync width and vertical sync height are not mentioned over there and I seem to calculate them incorrectly because the display is displaying image either very distorted, moved or cut. I have tried setting the h/v sync to 1 as well.
Could you please help me calculate the values and configure the LTDC?
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 = 67;
hltdc.Init.VerticalSync = 17;
hltdc.Init.AccumulatedHBP = 135;
hltdc.Init.AccumulatedVBP = 35;
hltdc.Init.AccumulatedActiveW = 455;
hltdc.Init.AccumulatedActiveH = 275;
hltdc.Init.TotalWidth = 475;
hltdc.Init.TotalHeigh = 279;Thanks in advance,
Greetings