cancel
Showing results for 
Search instead for 
Did you mean: 

LTDC and Partial FrameBuffer Strategy

QuiQuipu
Associate II

I have a STM32H7B3 Discovery Kit.

To free up RAM for my application I tried to configure the PartialFramebaffer.

Compilation fails with the following error message:

undefined reference to `touchgfxDisplayDriverTransmitActive'

The question is: is it possible in this scenario to use the PartialFramebaffer strategy ?

 

7 REPLIES 7

Hello @QuiQuipu,

If you are considering to use Partial Framebuffer, then you have to apply some changes to your STM32CubeMX project, and add manual code to handle the framebuffer transitions. 
The reason for the error you are receiving is that the function is not defined in your TouchGFXHAL.cpp file.

Please follow this documentation to enable Partial Framebuffer.

I hope this helps you. Don't hesitate to ask more questions! 

Mohammad MORADI
ST Software Developer | TouchGFX

Hello @Mohammad MORADI ESFAHANIASL,

is it possible to have a demo (maybe for the STM32H7B3 Discovery Kit) to better understand the implementation?
I have already used the Partial Framebuffer in the past, but on a display with an SPI controller that has its own internal memory.
I don't know how to implement it with the LTDC, even reading the documentation.

Thanks

My sincere apologies for making a mistake. I totally forgot that the Partial Framebuffer requires GRAM to work, and in my mind, I thought it is possible to just send a section of the framebuffer to LTDC which is far from reality. That is the reason why you were not able to do it. Again, I'm really sorry for my mistake.

If you're using the Board Setup available for STM32H7B3I DK in the TouchGFX Designer, you can decrease the Pixel Format from RGB888 to RGB565, and use single framebuffer.

You can see the difference between running the Smart Home Demo on RGB888 with double framebuffers and RGB565 with single framebuffer below:

RGB888 + Double FramebufferRGB888 + Double Framebuffer

RGB565 + Single FramebufferRGB565 + Single Framebuffer

For an extreme case, you can even set RGBA2222 (8bpp) which results in the following memory usage, however, the quality of the graphics might not be acceptable

RGBA2222 + Single FramebufferRGBA2222 + Single Framebuffer

 

Mohammad MORADI
ST Software Developer | TouchGFX

Hi @Mohammad MORADI ESFAHANIASL,

don't worry.
Thanks for the suggestion RGBA2222 + Single Framebuffer. I hadn't thought of that. I tried and now I have enough RAM space, but the graphics are not the best 

Allow me another question.
Would it be possible to use the other RAM areas, like those highlighted in the figure?

QuiQuipu_0-1723113194914.png

 

ITCMRAM and DTCRAM cannot be used with LTDC and DMA2D because are non-cacheable section. Also, both these sections and the other ones (RAM_CD and RAM_SRD) are not large enough to accommodate a framebuffer since STM32H7B3I DK uses a 480*272 display and if you set the bit per pixel to 16, you will need:

(480*272*2) / 1024 = 255 KB

which is larger than all of the highlighted memory sections.

Can I ask what you would like to achieve that 16 MB of SDRAM is not enough? 

Mohammad MORADI
ST Software Developer | TouchGFX

The RAM occupation that I shared with you with the last image is related to the 480x272 display.

What I want to do is change the display with one with a definition of 800x480.
By configuring ARGB2222 this is the current RAM occupation

QuiQuipu_0-1723211134738.png

but I still have to adapt the graphics part to the new resolution.

If I use RGB565 there is no space in RAM. This is the reason for my first post because I thought, mistakenly, that I could use the partial framebuffer.

Conclusion: for my application RAM are not enough

I think you need an external RAM or switch to a processor from the STM32U5 family with more RAM

The STM32H7B3I-DK already has external RAM, and it is enabled and configured in the TouchGFX Board Setup that I mentioned previously. 

STM32H7B3I-DK Board SetupSTM32H7B3I-DK Board Setup

As you can see in the memory sections below, SDRAM corresponds to the external RAM section.

SDRAM sectionSDRAM section

Please, either test with the TouchGFX Board Setup or enable SDRAM in your project and check the memory usage. Enabling SDRAM allows you to fit a framebuffer with 800x480 in RGB888

Mohammad MORADI
ST Software Developer | TouchGFX