2025-03-25 10:26 PM - edited 2025-03-26 10:20 PM
Hello,
I'm working with a graphics output on an STM32H750-based board.
My bitmap resources are stored in SQPI, and the frame buffers (double buffering) are in external SDRAM.
The external SDRAM settings are as follows: TEX=1, Bufferable=1, Cacheable=1, Shareable=0
SCB_CleanDCache() is being properly executed during frame buffer switching.
In TouchGFX 4.24.0, I'm experiencing the following issue: Screen flickering occurs under specific conditions (image is a sample):
After updating to TouchGFX 4.25.0, the screen flickering improves but still slightly exists (visible in the top right of the sample image).
I believe this was improved by modifications to the TouchGFX core, but there still seems to be a bug in handling the contention between CPU and DMA2D/LTDC when accessing the frame buffer.
What do you think?
For reference, in both 4.24.0 and 4.25.0, the flickering disappears when the MPU setting for external SDRAM is changed to Shareable=1. However, since setting Shareable to 1 somewhat slows down DCache access, I'd prefer to wait for a TouchGFX fix if this is something that can be resolved through TouchGFX improvements.
Solved! Go to Solution.
2025-03-26 3:01 AM
Hello @nonoriri ,
It seems that you have made a custom board from a STM32H750 MCU.
Also, you use LTDC.
This article explain how the basics of memory protection unit for H7 and it seems that the third paragraph could be the reason why you have missing pixels.
If you disable data cache and the issue is fixed, then you should look to implement the fix described in the third paragraph.
Regards,
2025-03-26 3:01 AM
Hello @nonoriri ,
It seems that you have made a custom board from a STM32H750 MCU.
Also, you use LTDC.
This article explain how the basics of memory protection unit for H7 and it seems that the third paragraph could be the reason why you have missing pixels.
If you disable data cache and the issue is fixed, then you should look to implement the fix described in the third paragraph.
Regards,
2025-03-26 11:07 PM - edited 2025-03-26 11:08 PM
Thank you for your kind response, GaetanGodart.
The link you shared was very helpful.
I've also checked the implementation of touchgfx::HAL::InvalidateCache() and touchgfx::HAL::FlushCache() in the TouchGFX engine, and they appear to be properly implemented.
In my software, I'm also executing CleanDCache() at appropriate timing (in TouchGFXHAL::setTFTFrameBuffer()) in addition to the functions above.
If proper DCache management is being performed, disabling Shareable for the Framebuffer shouldn't be an issue.
However, since flickering is actually occurring, I believe there's a DCache inconsistency happening at certain timings.
I've determined that enabling Shareable is the only viable solution in my software at this point.
While I can resolve my issue by enabling Shareable, I'm wondering if there might be a bug in TouchGFX itself?
I'm hoping for a fix in future updates.
Thank you.