Hi,
I just worked again on this issue, so here is an update and a summary about my problem.
-> The problem :
I'm working on a STM32H747-DISCO with the graphic library TouchGFX. I'm only using the M7 core under FreeRTOS. I added an other task called "CPU_Burner" to stress the CPU with some calculation to see how the TouchGFX's task respond and if the lagging effect is acceptable at some degrees. Of course the CPU_Burner task got an higher priority than the TouchGFX one or it won't get impacted.
When I flash the card and set up my CPU burner at 30% of the total load for example, after swiching between the two screens 1, 2 or 3 times, the TouchGFX GUI task freezed. And it's impossible to get it run again. The other task got no problem and is still runing, only TouchGFX and the screen remains fixed.
-> What I have done so far :
- I debugged the program to see where TouchGFX is stucked and it seems that it's in the file "OSWrappers.cpp", in the function "void OSWrappers::signalVSync()". If I understood correctly, the message queue to tell TouchGFX that the VSYNC buffer is ready to render is full.
- I added SystemView to monitor the application and i got the same result, TouchGFX stucked in signalVsync.
- I tried different screens setup and others projects and it allways endup freezing.
- For the MCU hint I disabled it and it didn't fixed anything. I will set up the precise address range for each external memory next week.
Some people managed to solve a similar issue with the MCU reconfiguration, in
this ST forum :
https://community.st.com/s/question/0D53W00000e067WSAQ/ui-stuck-in-takeframebuffersemaphore
-> The only solution that I Found :
- On that ST forum someone had a problem close to mine and apparently related to the DMA/DMA2D. He found a solution for his problem, adding some code in TouchGFXHAL.cpp to this function :
void HAL_DSI_TearingEffectCallback(DSI_HandleTypeDef* hdsi)
" if (!refreshRequested)
HAL::getInstance()->allowDMATransfers(); "
- I did the same and now everything seems fine but I didn't really understood why. The problem seems related to a framebuffer lock but I can't manage to access it and monitor the lock and unlock.
I made a simplier project with System View with with the same issue. You can download it and try my project to see the freeze by yourself.
Thanks again to all the people trying to solve this ! :)