Skip to main content
Associate III
October 10, 2026
Question

STM32H7S7 use PSRAM for Touch GFX and FREERTOS HEAP

  • October 10, 2026
  • 3 replies
  • 33 views

Hi,

I am using the STM32H7S7L8H6H microcontroller paired with the APS256XXN-OBx9 PSRAM, configured for two main purposes:

  1. Framebuffer for TouchGFX. (320*240 16bpp dual frame buffer).

  2. Heap region for FreeRTOS (heap_5.c), as my application is large and combining SRAM3 with DTCM leads to full SRAM

To follow ST's recommendations for TouchGFX, I configured the MPU without caching for the PSRAM region. However, this causes the FreeRTOS heap located in that same region to be non-cached, resulting in significantly slower performance.

I attempted to divide the PSRAM into two separate MPU zones (one cached for the heap and one non-cached for the framebuffer), but doing so introduced graphical glitches on the screen.

Do you have any recommendations or best practices to mitigate this issue and achieve both good heap performance and stable display output?

Thanks

 

 

3 replies

MM..1
Super User
October 10, 2026

I mean you dont get required info. But all this is basic math. Bus capacity vs load.
Seems you use display framebuffer in PSRAM, but no info one double triple how big ….

Next point is memory for GPU2D etc.

 

HamadyAuthor
Associate III
October 10, 2026

Hi ,

 

I use dual buffer strategy . With a technique to rotate screen.

https://community.st.com/stm32-mcus-touchgfx-and-gui-33/ltdc-rotation-180-degres-156813

 

And i have a 320x240 16bpp screen.

 

GPU2D memory is set as ST show it on h7rs web page for touch gfx

 

Thanks

 

MM..1
Super User
October 10, 2026

Rotate in sw is most bad choice , that exist only for last resort. Most LCDs have hw based rotate in chip.