cancel
Showing results for 
Search instead for 
Did you mean: 

External SDRAM Placement (Framebuffer, FrontendHeap)

nonoriri
Associate III

Thank you for reading.

I'm developing a GUI application using TouchGFX on an STM32H750-based board with a 1024 x 768 display using double buffering.

As the UI became more complex, the FrontendHeap instances exceeded 300KB, causing RAM_D1 region insufficiency. To solve this, I implemented the following:

  • Placed FrontendHeap instances in external SDRAM

However, when the bitmap cache was placed in external SDRAM, screen tearing occurred.
My final solution was to allocate only the View instances that are members of FrontendHeap to external SDRAM.
(View instances accounting for more than 80% of the total FrontendHeap instance size)

The resulting SDRAM configuration is:

  • Framebuffer[0]:Bank 0 (TEX=1, C/B/S=1/1/1)
  • Framebuffer[1]:Bank 1 (TEX=1, C/B/S=1/1/1)
  • FrontendHeap views:Bank 2 (TEX=1, C/B/S=1/1/0)
  • Outer and inner Write-Back. Write and read allocate.

Q1: For FrontendHeap views, I set Shareable to 0 since this area isn't accessed simultaneously by CPU and DMA/LTDC. Is this understanding correct? How do you think of my solution?


Q2:
According to AN4861, it's recommended to place framebuffers in different banks for optimal performance (section 5.5.3 "Optimizing the LTDC framebuffer fetching from SDRAM").
Is it correct that the remaining space in the same bank as the framebuffer should not be used for other purposes?


Q3:
To place framebuffers in different banks, I must set TouchGFX's Buffer Location to "By Address" instead of "By Allocation":

  • Start Address: 0xD0000000
  • Start Address 2: 0xD0400000

However, the auto-generated TouchGFXGeneratedHAL.cpp contains:

setFrameBufferStartAddresses((void*)0xD0000000, (void*)0xD0400000, (void*)0);

Does the TouchGFX Simulator ignore the framebuffer addresses and allocate memory separately for simulation?

For Double buffer with "By Allocation" in STM32CubeIDE, shouldn't TouchGFX be modified to use separate sections like "TouchGFX_Framebuffer" and "TouchGFX_Framebuffer2" instead of placing them sequentially?

0 REPLIES 0