TouchGFX double framebuffer not switching buffers
- August 23, 2023
- 1 reply
- 1688 views
I am working on a gui using an STM32H747I-DISCO connected to an external 640x480 display. The external display does not have a DSI interface, so the DSI-related code in TouchGFX is commented out.
The display works perfectly for static images, but heavily flickers during animations. To fix this, I tried to implement a double buffer, which you can see in the attached ioc image. This didn't fix the flickering, so I did a bit more digging.
I placed a breakpoint in TouchGFXGeneratedHAL::setTFTFrameBuffer (see the breakpoint image) to check the address for each framebuffer swap. What I found was that the address was fixed to the second framebuffer, and did not swap back and forth between the buffers, which you can see in the attached debug variables image. I confirmed the first framebuffer wasn't being used by watching the framebuffers in memory, which showed me that the memory at the first framebuffer location is not being written to.
How do I make the framebuffer switch as intended, and is there anything else I should change to fix the flickering?
