UI flickering resolved, but unclear how (ITM/DWT?)
I am in a pretty strange situation here.
I have an application using FreeRTOS and TouchGFX. This application occasionally sees screen flickering. I have tried different ways to mitigate it but have been unsuccessful until recently.
I tried enabling ITM and DWT to use the CYCCNT counter and ITM port 0 for some debug messages. I perform a print through the ITM port every 500 ms or so.
As far as I can tell, the addition of printing through the ITM port has reduced the flickering significantly. I have switched between my commits and this is pretty much the only change that's led to this improvement.
Personally I find this counterintuitive, as the printf call could only make things worse in terms of timings and memory accesses. However, this is not what I observe and so my questions are as follows:
- Is there any process by which enable the ITM/DWT debug frameworks could make the screen flickering issue disappear?
- Is there a good way to calculate timings for TouchGFX related processes and memoery accesses to compare the performace before and after?
Further information: I am using double framebuffer strategy (with animation buffer as well), LTDC, FMC is configured to use SDRAM bank 2 and has a 512Mbit memory connected to it. MCU is STM32H750.
Any help is appreciated.
