cancel
Showing results for 
Search instead for 
Did you mean: 

How much SDRAM memory I use? TouchGFX

qqAnton
Senior

Hello,

I use stm32f429 disco board which has IS42S16400J 64Mb SDRAM,

so I use SDRAM for frame buffer.

Is there any opportunity to know how much SDRAM memory my application needs?

and how much I use at the moment?

Thank you,

Anton

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @qqAnton​,

Ah, i responded to what the screen allocation uses.

The frame buffer allocation uses:

height * width * bitdepth * number of framebuffers

The bitdepth is in bytes used:

24 bitdepth: 3

16 bitdepth: 2

In this configuration the application is configured to use double buffering and an additional animation storage, so three framebuffers

height * width * bitdepth * 3

These frame buffers are located sequential starting from 0xD0000000.

the prototype for setFramebufferStartAddress

void setFrameBufferStartAddress(void* adr, uint16_t depth = 16, bool useDoubleBuffering = true, bool useAnimationStorage = true)

/Anders

View solution in original post

3 REPLIES 3

Hi @qqAnton​,

For the TouchGFX application you can look in the map file generated and look for: FrontendHeap::getInstance()::instance

Below is from a gcc map file, here the ram usage of the touchgfx gui application is 0x4bd4 located at 0x24000c20.

 .bss._ZZN12FrontendHeap11getInstanceEvE8instance

        0x24000c20   0x4bd4 TouchGFX/build/STM32H747I_DISCO/TouchGFX/target/BoardConfiguration.o

        0x24000c20        FrontendHeap::getInstance()::instance

This is statically allocated, TouchGFX will not allocate on runtime.

how much I use at the moment?

If you are using a OS, I suggest you enable the OS' watermark settings to check the current usage.

/Anders

@Anders Nedergaard PETERSEN​  thank you for the answer,

I am sorry, maybe I understand something wrong,

but I want to know how much SDRAM I use which starts from 0xD0000000,

static uint32_t frameBuf0 = (uint32_t)(0xd0000000);
hal.setFrameBufferStartAddress((uint16_t*)frameBuf0, bitdepth ,true , true);

Hi @qqAnton​,

Ah, i responded to what the screen allocation uses.

The frame buffer allocation uses:

height * width * bitdepth * number of framebuffers

The bitdepth is in bytes used:

24 bitdepth: 3

16 bitdepth: 2

In this configuration the application is configured to use double buffering and an additional animation storage, so three framebuffers

height * width * bitdepth * 3

These frame buffers are located sequential starting from 0xD0000000.

the prototype for setFramebufferStartAddress

void setFrameBufferStartAddress(void* adr, uint16_t depth = 16, bool useDoubleBuffering = true, bool useAnimationStorage = true)

/Anders