cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX hangs up at higher processor load

Sandro_K
Associate III

Hello!
I have an STM32F777 with FreeRTOS and TouchGFX. An SPI display is controlled in partial framebuffer mode via SPI4 and DMA. The implementation is the same as in the TouchGFX demo projects with partial framebuffer (NUCLEO_C071RB + GFX01M2). I have also attached my display SPI library.
The vSync signal is implemented at 60Hz via a software timer, as the hardware does not provide such a signal.
My hardware has an Ethernet port that provides a web server with the LwIP stack. This generates many interrupts during high data traffic, which puts a greater load on the processor.
During operation, this leads to a deadlock of TouchGFX after a few minutes. TouchGFX gets stuck in the function “getBlockForTransfer(Rect& rect)” in the line “assert(state[sendingBlock] == DRAWN);” (File: FrameBufferAllocator.hpp).
After that, the display is no longer updated.

If you need further information, please let me know.

TouchGFX config.png

TouchGFX_hang.png


Attached is the configuration.
I hope someone can help me.

1 REPLY 1
PeterVang
ST Employee

Hello Sandro,

I cannot immediately tell why your deadlock occurs, but I think I can help you with the high MCU load from TouchGFX. The display implementation in "NUCLEO_C071RB + GFX01M2" is designed to work without an OS, so it will simply busy wait when transferring to the display, which means high MCU load. Since you have an OS in your project, it should instead be sleeping while waiting for the display transfer.

To implement this, you can look at the "NUCLEO-H563ZI + RVA35HI" for inspiration. This project is setup with partial framebuffer and FreeRTOS, and sleeps while waiting for display transfers. You should pay special attention to the functions called FrameBufferAllocatorWaitOnTransfer, waitUntilTransmitEnd and waitUntilCanTransferBlock.

Best regards,

Peter