Skip to main content
Visitor II
April 2, 2025
Question

How to determine proper DSI, LTDC and HDMI timings?

  • April 2, 2025
  • 1 reply
  • 1631 views

This is my first time working with any DSI/LTDC/HDMI related stuff, so I'm still figuring a lot of this stuff out and could use some help figuring out how times and clock speeds all interact.

I'm using the STM32H757 Eval board.  I have it working with the on board 800x480 display and purchased one of the HDMI adapters they make for this board.  Using one of the example projects I got that displaying at 720x480 to a standard computer monitor (a 1080p capable BENQ).  I now want to increase the resolution and... can't figure out what I need to change.

The example code sets:

DSI to 40625 Khz
LTDC to 27083 Khz


And it uses these timings

Timing->HSYNC = 62U;
Timing->HBP = 60U;
Timing->HFP = 30U;
Timing->VSYNC = 6U;
Timing->VBP = 19U;
Timing->VFP = 9U;
Timing->HACT = 720U;
Timing->VACT = 480U;

I have no idea how they computed those timings.
I found this website: https://tomverbeure.github.io/video_timings_calculator which has very similar timings, but not exactly the same.  It has numerous columns (that I assume are standards of some kind?), but the closest was CEA-861 with the values

Timing->HSYNC = 62U;
Timing->HBP = 60U;
Timing->HFP = 16U;
Timing->VSYNC = 6U;
Timing->VBP = 30U;
Timing->VFP = 9U;
Timing->HACT = 720U;
Timing->VACT = 480U;

I plugged in those timings and those seem to work.  I don't know why there is a slight discrepancies between the example code and that website, but both seem to work so I guess it's close enough.

Using the same website, I switched to 1280x720 @30Hz and all the frequencies go up and so do the timings.  So I guess I have to change my DSI and LTDC frequencies... but how exactly do those two interact?  Does the DSI just always need to be higher than the LTDC?  Do they have to be at a certain ratio?  The column that was closets to the values in the example code for 720x480 came from the CEA-961 column.  For 720p @30Hz that column has running at more than twice the pixel clock speed of the others (74.25MHz).  The DSI goes up to 62MHz per lane (1Ghz total... which I don't really know how either of those two numbers interact, but I know they're a thing).  62 is less than 74, which is what the LTDC would have to be running at if I used that column.  Is that allowed?  Should I be using a different column?

I know that to do certain resolutions at certain frequencies you need X amount of bandwidth, but I don't really know how those numbers are computed and how that corresponds to requisite clock speeds.

Basically, any direction at all would be greatly appreciated.  With displays things often either work or they don't so it can be difficult to figure out exactly what's wrong  Thanks!

    This topic has been closed for replies.

    1 reply

    Graduate II
    April 2, 2025

    3 simple conditions :

    a / LTDC clock is pixel clock in choiced pixel format 

    b / DSI clock is data serial transfer byte clock  x 8 bit clock ... 62.5 x 8 = 500Mbit for one lane

    c / MX entering LTDC automatic recalculate DSI porchs

    Limits is lane data capacity ... example

    1280x 720 x 16 (RGB565) / DSI 1Gbit = max 67,81Hz FPS  (real use 90%)

    1280 + porchs x 720 + porchs x 67,81 x0,9  = LTDC clock ...

    JKaz.1Author
    Visitor II
    April 2, 2025

    OK, so LTDC clock rate is not necessarily directly related to the DSI rate and is instead related to the particular formatting being used.
    The HDMI module from ST has the ADV7533 chip on it, which says "Automatic input video format timing detection (CEA-861E)", so presumably I want to use the CEA-861 column on that website.
    So that means: LTDC must be 74.25 MHz.

    If I'm running at RGB888, then my math should be:

    1280 x 720 x 24 / 1GBit = 45.21 fps
    If I want to run at only 30fps, then I need to configure the DS for 663.5MHz, which means each line needs to be 41.46 MHz in CubeMx.  OK, I think I understand part.  Can the DSI speed be faster than 41.46 MHz, or does it have to match exactly?

    I still do not know what to use for the porches though.  The LTDC page of CubeMX has me manually setting the Synchronization Width, Back Porch, and Front Porch for both horizontal and vertical?  ... Do I use the values from that website?

    Graduate II
    April 2, 2025

    You still missunderstand. DSI speed is 1Gbit in calculations , you cant underspeed ! If you choice 45FPS then you simply fill max speed and dsi must be 62,5MHz.

    Second calculated is LTDC pixel clock no DSI and here for you use my last eq.

    Normal DSI displays can use bigger DSI clock as data though from LTDC not lower or equal.

    And yes for 30fps you can use lower DSI and right pixel clk. But HDMI DSI bridge is next IC and req meet condition.