2024-08-05 05:56 AM
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 ?
2024-08-06 07:10 AM
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!
2024-08-06 07:43 AM
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
2024-08-07 02:55 AM
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:
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
2024-08-08 03:34 AM
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 :frowning_face:
Allow me another question.
Would it be possible to use the other RAM areas, like those highlighted in the figure?
2024-08-09 05:29 AM
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?
2024-08-09 06:16 AM - edited 2024-08-09 06:45 AM
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
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
2024-08-14 02:00 AM
The STM32H7B3I-DK already has external RAM, and it is enabled and configured in the TouchGFX Board Setup that I mentioned previously.
As you can see in the memory sections below, SDRAM corresponds to the external RAM 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