2024-09-30 05:40 AM - last edited on 2024-09-30 05:51 AM by Andrew Neil
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
Solved! Go to Solution.
2024-10-03 04:23 AM
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.
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.
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.
2024-10-03 04:23 AM
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.
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.
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.