cancel
Showing results for 
Search instead for 
Did you mean: 

TouchGFX + GPU2D not working on STM32U5

scottg
Associate II

Hi everyone,

I'm using TouchGFX on a STM32U5G9 microcontroller and got stuck while trying to enable GPU2D (aka NeoChrom).

The starting and working configuration is TouchGFX + LTDC + DMA2D. Everything works properly: the signalVSync function of the OSWrappers is called periodically due to LTDC interrupts and so the counterpart waitForVSync.

As soon as I enable the GPU2D acceleration from CubeMX (following the guide here https://support.touchgfx.com/docs/development/touchgfx-hal-development/generator-how-to/touchgfx-al-configuration/driver), the screen remains black despite the signalVSync function is actually called. On the other hand the waitForVSync function is called 2 or 3 times and then no more.

Does anyone have an idea of what's happening? What am I doing wrong?

Thank you for your help.

12 REPLIES 12

Yes 3MB, but this memory isnt one type and usage . And for next buff open in target generated nema_hal.c and yuo see in older TGFX

#define RING_SIZE                      1024 /* Ring Buffer Size in byte */
#define NEMAGFX_MEM_POOL_SIZE          10240 /* NemaGFX byte pool size in byte */

LOCATION_PRAGMA_NOLOAD("Nemagfx_Memory_Pool_Buffer")
static uint8_t nemagfx_pool_mem[NEMAGFX_MEM_POOL_SIZE] LOCATION_ATTRIBUTE_NOLOAD("Nemagfx_Memory_Pool_Buffer");

  and in 4.25

#define RING_SIZE                      1024 /* Ring Buffer Size in byte */
#define NEMAGFX_MEM_POOL_SIZE          26368 /* NemaGFX byte pool size in byte */
#define NEMAGFX_STENCIL_POOL_SIZE      403840 /* NemaGFX stencil buffer pool size in byte */

LOCATION_PRAGMA_NOLOAD("Nemagfx_Memory_Pool_Buffer")
static uint8_t nemagfx_pool_mem[NEMAGFX_MEM_POOL_SIZE] LOCATION_ATTRIBUTE_NOLOAD("Nemagfx_Memory_Pool_Buffer"); /* NemaGFX memory pool */

LOCATION_PRAGMA_NOLOAD("Nemagfx_Stencil_Buffer")
static uint8_t nemagfx_stencil_buffer_mem[NEMAGFX_STENCIL_POOL_SIZE] LOCATION_ATTRIBUTE_NOLOAD("Nemagfx_Stencil_Buffer"); /* NemaGFX stencil buffer memory */

and stencil is recommend bigger ...

Oh, I see... I guess this could be the issue.

Anyway, my application compiles and the linker does not complain.

mathiasmarkussen
ST Employee

If you disable vector rendering for TouchGFX in CubeMX the stencil buffer will not be needed, so it will be omitted from the generated file.

You can try to break before the allocations of the buffers in your IDE and see if the crash happens at that point.