cancel
Showing results for 
Search instead for 
Did you mean: 

where does touchgfx creates its frame buffer?

Jloda.11
Associate II

I want to understand where does touchgfx creates its frame buffer isn't the internal ram of microcontroller like stm32f746 small? for driving a display with a resolution of 480x272 pixel

2 REPLIES 2
allard
Senior

Check TouchGFXGeneratedHAL.cpp, for my STM32F7 discovery kit the following buffer is created:

setFrameBufferStartAddresses((void*)0xC0000000, (void*)0xC003FC00, (void*)0);

If i'm correct 0xC000 0000 is in the external RAM memory.

Peter BENSCH
ST Employee

The location of the framebuffer is very flexible: it can be located in external or internal RAM. Of course, the use of internal RAM is only possible if the resolution with the desired color depth fits into the internal RAM.

In addition to other RAM blocks, the STMF746 offers 240 KB of contiguous RAM that can be used as a frame buffer, which is enough e.g. for your 480x272 resolution if you are happy with 8 bits color depth (256 colors):

480x272 pixel = 130560 pixels, this requires at a color depth of:

  • 1bit/px: 130560 bit = 16KB
  • 4bit/px: 522240 bit = 63.75KB
  • 8bit/px: 1044480 bit = 127.5KB
  • 16bit/px: 2088960 bit = 255KB
  • 24bit/px: 3133440 bit = 382.5KB

Of course you'd need external RAM in case you'd need 16bit/pixel or more colors.

Does it answer your question?

If the problem is resolved, please mark this topic as answered by selecting Select as best. This will help other users find that answer faster.

/Peter

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.