Skip to main content
BGuth.1
Senior
September 15, 2022
Solved

How to modify display frame rate

  • September 15, 2022
  • 3 replies
  • 1918 views

My project uses LTDC as application tick source and two frame buffers. I am trying to understand:

1. What the current frame rate (I understand this is same as vSync frequency) is. I know it can be measured by monitoring vSyncFreq GPIO. But I want to see where it is in code.

2.What are the steps to change frame rate? I would like to see it in code please.

If frame rate is change is achieved by changing the pixel clock, what is the relation between two.  

I appreciate your help.

This topic has been closed for replies.
Best answer by MM..1
YES and YES
DCLK you dont see directly , but in PLL config.
hltdc.Init.TotalWidth = 511;
hltdc.Init.TotalHeigh = 1296;

3 replies

MM..1
Super User
September 15, 2022

Your reply is in your question. Framerate based on LTDC is based on DCLK = dot clock. LTDC clock in MX clock config.

Calculating frame rate then is based on DCLK / ( HOR x VERT ) ... sum of porch and sync include.

Example for 800x480 LCD and DCLK 33MHz

FR = 33M / ( 840x520 ) = 75,55 Hz

This is true only for LCDs in video mode RGB, displays with own memory or other interfaces (SPI ...) works other way.

BGuth.1
BGuth.1Author
Senior
September 15, 2022

"LTDC clock in MX clock config"

Is it possible to see this in generated code?

"sum of porch and sync include"

is it both front and back porch? i.e. front porch + back porch + sync?

MM..1
MM..1Best answer
Super User
September 16, 2022
YES and YES
DCLK you dont see directly , but in PLL config.
hltdc.Init.TotalWidth = 511;
hltdc.Init.TotalHeigh = 1296;