cancel
Showing results for 
Search instead for 
Did you mean: 

stm32H7b0 create double-buffered config for 1-layer LTDC using internal SRAM for frame buffer

HMohammadi
Associate

Hi, I am using stm32H7b0 in my project, can you help me how to create a double buffer for config   1-layer LTDC that uses internal SRAM for frame buffer? if you give me a sample code that would be better.

Thank you

1 ACCEPTED SOLUTION

Accepted Solutions
KDJEM.1
ST Employee

Hello @HMohammadi and welcome to the Community,

 

Generally you can use 2 framebuffers: One buffer for display (used by LTDC), and a second buffer for computation (used by DMA2D). Depending on framebuffer size (display resolution, color depth ..), and available memory, user can decide either to use internal RAM or external SDRAM.  All this is well explained in detail in AN4861.

For STM32H7B0, the total embedded SRAM size is 1.18 Mbytes and 4 Kbytes of backup SRAM.

KDJEM1_0-1727953004532.png

So, as mentioned, you need to check if the double frame can be located in the internal SRAM or the size of double frame buffer exceeds the internal SRAM size. Note that the double frame buffer calculation depends on color depth and display.  

For that, I recommend you to take a look at  AN4861 precisely 7.2 Example: creating a basic graphical application.

This section provides an example based on the STM32F746G-DISCO board, describing the steps required to
create a basic graphic application and explains how determining framebuffer size and location.  

KDJEM1_1-1727953773708.png

 

To create double-buffered config for 1-layer LTDC using internal SRAM, I recommend you to start with LTDC_Display_1Layer example and get inspired to create you own project.  

 

I hope this help you.

Thank you.

Kaouthar

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

1 REPLY 1
KDJEM.1
ST Employee

Hello @HMohammadi and welcome to the Community,

 

Generally you can use 2 framebuffers: One buffer for display (used by LTDC), and a second buffer for computation (used by DMA2D). Depending on framebuffer size (display resolution, color depth ..), and available memory, user can decide either to use internal RAM or external SDRAM.  All this is well explained in detail in AN4861.

For STM32H7B0, the total embedded SRAM size is 1.18 Mbytes and 4 Kbytes of backup SRAM.

KDJEM1_0-1727953004532.png

So, as mentioned, you need to check if the double frame can be located in the internal SRAM or the size of double frame buffer exceeds the internal SRAM size. Note that the double frame buffer calculation depends on color depth and display.  

For that, I recommend you to take a look at  AN4861 precisely 7.2 Example: creating a basic graphical application.

This section provides an example based on the STM32F746G-DISCO board, describing the steps required to
create a basic graphic application and explains how determining framebuffer size and location.  

KDJEM1_1-1727953773708.png

 

To create double-buffered config for 1-layer LTDC using internal SRAM, I recommend you to start with LTDC_Display_1Layer example and get inspired to create you own project.  

 

I hope this help you.

Thank you.

Kaouthar

 

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.