cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure internal memory for LCD without using external RAM and Flash

NguyenAnhHieu_
Associate

Hello everyone, I'm currently using the STM32H745BIT6 microcontroller and I'm having difficulty configuring the system so that the M7 core can use internal memory (Internal RAM/Flash) to store data from TouchGFX. I would like to avoid using any external memory (external RAM or Flash). I'm not sure how to properly configure this. I would greatly appreciate any support or guidance. Thank you !

NguyenAnhHieu__0-1742953516422.png

NguyenAnhHieu__1-1742953549735.png

 

2 REPLIES 2
JJhin.1
Senior II

i think you want to store frame buffer of TouchGFX in the internal RAM... if im correct then you need to change Buffer location Frome By Adress to by alloaction. if there is no linker script present for Frame Buffer then controller will automatically allocate this buffer to D1 or D2 RAM .

But if your using internal memory for frame buffer then you should avoid taking images with large size in TouchGFX designer, frame buffer size is dependent on your LTDC parameters in some cases buffer size wont get fitted into internal RAM. 

 

GaetanGodart
ST Employee

Hello @NguyenAnhHieu_ ,

 

Since your board is not working yet, we recommend you to disable the DCache for the moment and to set it up once you have a working project.

It is also recommended to keep the buffer location as "By allocation" to let TouchGFX choose where to put it.
Then, in your linker script you can tell that you want the framebuffer in the internal RAM.
We put the framebuffer in internal RAM on the STM32U5G9J-DK2 TBS so you can look how we did that :

MEMORY
{
  RAM       (xrw) : ORIGIN = 0x20000000, LENGTH = 3008K
  FLASH     (rx)  : ORIGIN = 0x08000000, LENGTH = 4096K
  EXT_FLASH (r)   : ORIGIN = 0xA0000000, LENGTH = 128M
}

/* Sections */
SECTIONS
{
.
.
.

.
.
.
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);
  } >RAM
.
.
.

.
.
.
}

 

The STM32H745BI has 2MBytes of internal flash so you have enough to put a full framebuffer in it, maybe enough for a double depending on your display resolution and color precision:

GaetanGodart_0-1742984732505.png

 

We also have a STM32H750-DK TBS that you could look at but we use external memory for this one.

 

Regards,

Gaetan Godart
Software engineer at ST (TouchGFX)