STM32F429: TouchGFX UI freeze because memory is overwritten
Hi,
I setup a project for STM32F429 MCU by using STM32CubeMX with LTDC, DMA2D, FreeRTOS and TouchGFX enabled. It works very well with a splash screen and a main screen. However, when I added another simple screen, the UI freezes after some screen switch operations. The problem can be reproduced 100%, and always at the some place.
After some investigation, I found the UI task is hung in OSWrappers:waitForVSync() -> xQueueReceive() -> prvUnlockQueue() -> xTaskRemoveFromEventList()->configASSERT(pxUnblockedTCB).
The reason is: memory of vsync_q (in OSWrappers.cpp) is overwritten by unknown reason. vsync_q.xTasksWaitingToSend.uxNumberOfItems is no longer 0, which cause the assert fail.
I added a memory write access breakpoint, and tried to catch the 'evil' code, but it breaks in the interrupt handler: DMA2D_IRQHandler(), and the memory has been changed already. So, I lost clue here, and it seems DMA2D did some incorrect operation towards the memory.
Can anyone give me some suggestion to debug and resolve this problem? Many thanks!
BTW, I have tried to increase the stack size and heap size, and the problem still exist.
Br,
Peter
