2026-01-22 10:11 AM
Hi,
I'm trying to drive a 5 in LCD with STM32H757. However the MCU's internal RAM is too small for the frame buffer for this 800x480 LCD. So I have a PSRAM APS6404L on the QUAD SPI bus. I have succeeded in setting the memory mapped mode for reading the PSRAM, but I don't know how to integrate the custom write routine for the touchGFX. The MX configurator seems not allow me to set up a partial frame buffer in the internal RAM. I have tried to use custom LCD type to forcefully set the partial frame buffer, but I'm unable to get the touchGFX task to run.
Does the custom LCD type require lot of work? I feel so stuck right now. Please help. Thank you.
2026-01-28 5:56 AM
What interface is your display using?
I'm guessing that a display of that size does not have internal memory, which is needed for the partial framebuffer to work.
You can try to place your framebuffer in the exteral RAM, but I'm not sure you will have enough bandwith on QSPI.
Placement can be done by setting "Buffer Location" to "By Address" in the TouchGFX settings in CubeMX and setting the address to your external RAM base address. Alternatively, you can use "By Allocation" and place it using your linker script. For GCC compatible linker it would look something like this with the correct addresses and sizes and keeping you original linker script except for the needed modification:
MEMORY
{
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 3008K
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 4096K
EXT_RAM (r) : ORIGIN = 0xA0000000, LENGTH = 128M
}
FramebufferSection (NOLOAD) :
{
*(TouchGFX_Framebuffer TouchGFX_Framebuffer.*)
*(.gnu.linkonce.r.*)
. = ALIGN(0x4);
*(Nemagfx_Stencil_Buffer Nemagfx_Stencil_Buffer.*)
*(.gnu.linkonce.r.*)
. = ALIGN(0x4);
*(Nemagfx_Memory_Pool_Buffer Nemagfx_Memory_Pool_Buffer.*)
*(.gnu.linkonce.r.*)
. = ALIGN(0x4);
} >EXT_RAM