Display shift seems to be resolves by changing pixel clock (BOARD_InitLcdifPixelClock function), but I'm not sure that calculation is correct.
First comment explain how to calculate pixel frequency for screen refresh rate. In my case (320 + 4 + 8 + 43) * (240 + 4 + 8 + 12) * 60 = 5.94Mhz (example gives (480 + 41 + 4 + 18) * (272 + 10 + 4 + 2) * 60 = 9.2M. Here set the LCDIF pixel clock to 9.3M)
Next comment explain how calculate parameters to configure video pll,
* Video PLL output clock is OSC24M * (loopDivider + (denominator / numerator)) / postDivider = 93MHz.
but I don't understand why result is 93Mhz (instead of 9.3Mhz, is tere a factor 10 ?)
I think also there is a mistake in formala, it should be (numerator/denominator instead of denominator/numerator) but these fields are set to 0 in example.
Using these formula, for rate refresh at 60Hz I obtain: .loopDivider = 39, .postDivider = 16, .numerator = 600, .denominator = 1000, //Display refresh at 60Hz (pixel clk = 5.940M) (valid range for loopDivider is 27-54), but with these values I always have display shift.
I tried with 57Hz screen rate refresh and a full screen display is correct (clock video = .loopDivider = 37, .postDivider = 16, .numerator = 620, .denominator = 1000, //Display refresh at 57Hz (pixel clk = 5.643M)
Could you comfirm if this approach is correct and will resolve my problem.
Regards