cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 How to use LTDC

kulfi27
Associate II

Hi, I designed a board with uC STM32H743 that works with a 480x800 display connected through the LTDC peripheral, I don't quite know how to use the LTDC, I don't have ram for the buffer of the entire display. What I can do is fill the background with color, but on layer1 I can only display one buffer at a time, when I display another one, the previous one disappears. In various videos I see that even small uCs can handle a larger display without a large buffer. My question is, what should the procedure for loading smaller buffers into layer1 look like?

4 REPLIES 4
MM..1
Chief III

@kulfi27 wrote:

uCs can handle a larger display without a large buffer.


you miss, this is valid only for displays with internal frame memory. Or for displays with sloooow refresh rate.

743 provides 1 to 2 Mbytes Flash memory, 1 Mbyte of SRAM with the following architecture: 192 Kbytes of TCM RAM (including 64 Kbytes of ITCM RAM and 128 Kbytes of DTCM RAM for time-critical routines and data), 512 Kbytes, 288 Kbytes and 64 Kbytes of user SRAM ...

I see here plenty space for one L8 or 565 framebuffer, when your display dont have internal memory...

 

kulfi27
Associate II

Thank you for your response, I already understand how the LTDC peripheral is supposed to work. I don't know how to place data in other sectors of SRAM, the compiler loads everything into RAM_D1 memory. Can someone help me with this issue?

Does your design include a screen with it's own controller and buffer, or are you trying to send R G B signals to the pane?

LTDC is primarily a frame buffer DMA unit

Small uC's typically use panels with their own frame buffer, and you manipulate that, either moving bit maps, or painting/drawing type primitives implemented on the controller.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
kulfi27
Associate II

I'm using LTDC to drive an 800x480 RGB565 display. Due to limited internal RAM and LTDC being able to access only SDRAM1 (512KB), I implemented partial screen updates using two 800x160 buffers and the LTDC line interrupt.

Each frame is split into 3 sections (160 lines each). In the LTDC line interrupt, I switch buffers and update the and to display one section at a time. The switching works for the first two sections (0 and 1), but the third section (2) shows only the background color — missing all text or drawn content.WVPCRCFBAR

When debugging step-by-step with breakpoints, the missing content does appear correctly, which suggests a timing/synchronization issue.

It seems that LTDC may require buffer and window updates to be applied ahead of time (before it starts drawing the section). I tried updating , , and triggering in the line interrupt and even pre-setting the to fire ~20 lines earlier, but the problem persists.CFBARWVPCRSRCRLIPCR

Any suggestions on the correct timing to safely update LTDC layer address and window region before a partial refresh?