2025-07-03 2:10 PM
On our custom board running STM32U5G7 I have set up a project using the same configurations in the .ioc file of the STM32U5G9J-DK2 but obviously with our pinout and package.
The project compiles and runs, it does display correctly on the sim but there is no image on the LCD (I have previously verified the working LCD by writing to the framebuffer in board bring up. (https://support.touchgfx.com/docs/development/board-bring-up/board-introduction).
I can see with the debugger that the hal.taskEntry() is called. But setting breakpoints in touchGFX designer code such as screen setup does not run.
void touchgfx_taskEntry()
{
/*
* Main event loop. Will wait for VSYNC signal, and then process next frame. Call
* this function from your GUI task.
*
* Note This function never returns
*/
hal.taskEntry(); // <-- this line does get executed
}
The FreeRTOS wrappers are generated by TouchGFX and I have enabled the relevant interrupts for the LTDC and GPU2D.
How would I go about debugging next steps? Is there a way to monitor the touchGFX engine?
2025-07-04 2:46 AM
At what step did you stop? https://support.touchgfx.com/docs/development/board-bring-up/board-introduction
Can you upload your TouchGFXHAL.cpp?
2025-07-05 6:19 AM
Thank you for responding @unsigned_char_array,
Some of the steps are not available for our set up such as external ram or external flash. But the important ones such as DMA2D and internal ram frame buffer work as expected. See below for the detailed steps.
The TouchGFXHAL.cpp is the stock implementation (attached) since the base class does all the heavy work same way as the DK impl.
I can see the OS Hooks being called, but observing the framebuffer memory in debug shows it to be all black while the screen is supposed to be white (0x0000 vs 0xFFFF).
It would have been nice for the CubeIDE to compile a touchgfxEngine project without first needing the designer and just show a test pattern or something. or other ways of knowing it's running well. I can see beginFrame() being executed but never see flushFrameBuffer() run.
Somehow the framebuffer is not being filled by the touchGFX engine and at this point I have no further recourse on debugging the project.
2025-07-05 6:36 AM - edited 2025-07-05 6:38 AM
You lacks info. Image with checks is very basic, U5 with GPU is little harder.
Show your main code and MX_LTDC_Init etc... Good to if RTOS used show app_freertos.c
And about debug, you can as normal place breakpoint and ... Primary check if model.cpp func tick is entered...
2025-07-07 6:31 AM
Thanks @MM..1 , good to know we can check the tick function the model.cpp
Diff comparing the .ioc files between the DK and one generated by CubeMX, I was not able to match them and making them equal using the UI.
In the end I had to manually copy whole RCC, NVIC, RTOS, and TouchGFX sections from the DK template used in TouchGFXDesigner and trick CubeMX to accept and generate based on these settings before the issue went away.
This meant using the slightly older TouchGFX Engine and RTOS that the DK uses.