Skip to main content
NKieg.1
Associate III
February 2, 2021
Question

Using SDRAM as ExtFlashSection for TouchGFX

  • February 2, 2021
  • 6 replies
  • 2545 views

Hello!

I successfully created a user interface on an STM32F469I-DISCO which looks rather neat.

However, with only a few icons it uses, the memory is already about 80% full. That's why I tried to use the embedded SDRAM to store the data required for the layout. I added the SDRAM to the linker file using the following :

SDRAM		(xrw)	: ORIGIN = 0xC0000000, 	LENGTH = 16M

The embedded SDRAM is supposed to be 128Mbit but I test with only 16Mbit.

However, when I place the ExtFlashSection for TouchGFX inside the SDRAM with

ExtFlashSection :
	{
		*(ExtFlashSection ExtFlashSection.*)
		*(.gnu.linkonce.r.*)
 . = ALIGN(0x4);
	} >SDRAM
 
 BmpCacheSection (NOLOAD) : { *(BmpCacheSection) } >SDRAM
 TouchGFX_Framebuffer (NOLOAD) : { *(TouchGFX_Framebuffer) } >SDRAM
 TouchGFX_Framebuffer1 (NOLOAD) : { *(TouchGFX_Framebuffer1) } >SDRAM
 TouchGFX_Framebuffer2 (NOLOAD) : { *(TouchGFX_Framebuffer2) } >SDRAM

the display shows crap.

I attached two pictures, one which shows how the screen is supposed to look and one showing the display after placing stuff inside the SDRAM. Did anyone encounter this issue before? When yes, what had been done?

0693W000007DcNbQAK.jpg0693W000007DcNMQA0.jpg 

Thank you a lot,

Nicolas Kieger.

This topic has been closed for replies.

6 replies

MM..1
Super User
February 2, 2021

Your idea is fail. And too your lines 8-11 is for me puzzle.

Primary you need learn how memory is for what usable. Extflash section in TouchGFX design is for graphics const data, when you redefine in to SDRAM ,after reset data not exist, need preload from FLASH then you have same data on two places...

Second miss must be your config, because 2M FLASH can store perfect amount of graphics in 24bit colorspace. When you need more use L8 formats for store images.

NKieg.1
NKieg.1Author
Associate III
February 3, 2021

Thank you for your reply !

So there is no "easy" way to store the TouchGFX graphics in the SDRAM?

I will take a look at L8 formats too, that may resolve my problem !

Thank you :)

MM..1
Super User
February 3, 2021

SDRAM isnt retained when power off, then cant store anything between power off, but can store temporary any data, graphics too for example images loaded from network or extracted from jpeg ...