2022-06-08 12:00 PM
I enable double buffering in Cube, switching Framebuffer Strategy to Double Buffer. When I run my application I get the start screen but it hangs on initial screen. I'm sure I have enough memory for a second buffer, I used the block for Animation Storage and it worked (but it was very slow). To see if it can get any faster I enabled double buffering and it just died. Where's the catch? I use TouchGFX 4.19.1 and run my application on STM32H747I-DISCO board.
2022-06-09 05:57 AM
Hello HTD,
Can you share with us the configuration you have or your project ? (framebuffer start addresses, display interface, width, height etc ...)
/Osman
2022-06-09 06:10 AM
Would suggest providing minimal code that demonstrates the issue.
Hard to guess at what you're doing wrong from the description.
Pretty sure the hardware works as designed and intended. So start at things like the memory used, the buses it has to traverse, if the DMA throws some error, etc.
2022-06-09 06:13 AM
Of course, here it goes:
The configuration presented is for single buffer, because when I switch to double buffer my application crashes.
My current code uses followin user code initialization:
/* USER CODE BEGIN initialize step 2 */
setAnimationStorage((void*)0xD0180000); // right after frame buffer, to enable slide transitions.
HAL::getInstance()->setFrameRateCompensation(true); // to make slide transitions blazing fast.
lockDMAToFrontPorch(false);
mcuInstr.init();
setMCUInstrumentation(&mcuInstr);
enableMCULoadCalculation(true);
/* USER CODE END initialize step 2 */
For double buffer I used address 0xD0300000 for the animation storage, 0xD0180000 was the second frame buffer address.
2022-06-09 06:31 AM
Please read the configuration I've just pasted in previous comment.
I include touchgfx/target/generated files.
To replicate the issue:
Since I'm critically busy, that's all for now, I'll create a github repo with examples right after I finish my current work, so it will be like next week. What I described should (probably) make the problem apparent. Exact board model, the hardware configuration, and how to trigger the crash. BTW, animations and slide effects are not important here - it crashes regardless of the animation storage set or not. I just first noticed the missing transition effects, I enabled the animation storage, it worked but looked bad because was too slow, then enabled double buffering and it died. I worked around the frame rate issue with enabling frame skipping option and went with single buffer to continue my work.
2022-06-14 01:17 AM
Hello HTD,
This TBS (TouchGFX Board Setup) is not prepared for double framebuffer actually. Unfortunately it's something that you won't be able to use, until we update this TBS. And I can't promise you something on it soon.
/Osman
2022-06-14 01:27 AM
Thanks for info.
I've tested that it's not a matter of DCache issue on H7, but indeed it behaves differently with DCache disabled. With DCache enabled I got occasional garbage on the screen while downloading / connecting debugger, with DCache disabled the issue disappeared. From what I've read on H7 DCache enabled requires extra steps performed while using DMA and original HAL drivers (at least those provided with my board) don't do it, so the data corruption occurs.
Also, that would be nice if Animation Storage and Frame Rate Compensation options appeared in the TouchGFX Generator Cube options in the next version ;).
2023-07-07 06:03 AM
We ran into this same issue... It has been over 1 year since this post was posted. Is there any planned updates to help correct/fix this issue? Or any workarounds that can be done to resolve it?
2023-07-07 06:03 AM
We you ever able to get this resolved?
2024-02-17 07:55 AM
ST doesnt care about anything last few years. The fix of bug from CubeMx about number overflow took them two years to fix. So this is reported two years ago so fix will be within next three.