cancel
Showing results for 
Search instead for 
Did you mean: 

How to modify display frame rate

BGuth.1
Senior

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.

1 ACCEPTED SOLUTION

Accepted Solutions
YES and YES
DCLK you dont see directly , but in PLL config.
hltdc.Init.TotalWidth = 511;
hltdc.Init.TotalHeigh = 1296;

View solution in original post

3 REPLIES 3
MM..1
Chief II

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.

"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?

YES and YES
DCLK you dont see directly , but in PLL config.
hltdc.Init.TotalWidth = 511;
hltdc.Init.TotalHeigh = 1296;