Skip to main content
Visitor II
September 30, 2024
Solved

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

  • September 30, 2024
  • 1 reply
  • 782 views

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

    This topic has been closed for replies.
    Best answer by KDJEM.1

    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

     

    1 reply

    KDJEM.1Answer
    Technical Moderator
    October 3, 2024

    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