2025-04-15 6:15 AM
I'm working on a project using TouchGFX Designer v4.25.0 with the NUCLEO-H503RB board and GFX01M2 display module. The firmware is based on STM32Cube FW_H5 V1.5.0 and V3.0.6 on the touchGFX project version
The main idea of the project is to communicate by CAN and to display the information received in a text on the screen.
Here's is the issue: when I enable peripherals like CAN, UART1 or UART2 via STM32CubeMX, and generate the code, text stops displaying on the screen.Although the rest of the graphical elements are displayed. If i comment out the Init functions, the text show up correctly.
This are the things i've test so dar
I tried enabling "Mapped Text Storage Format" in TouchGFX as a workaround. It causes a HardFault in this function --> touchgfx::ConstFont::find(unsigned short)
I also tried using vector fonts instead of raster ones, but the issue persists.
I tested with different STM32Cube FW_H5 versions, but the problem remains the same.
It feels like there's a memory conflict between the peripheral initializations and how TouchGFX stores or accesses text/fonts. Maybe the memory layout gets affected when enabling these peripherals?
Has anyone experienced something similar with this board/setup?
Any suggestions on what I can try ?
Thanks!
2025-04-15 6:22 AM
> Maybe the memory layout gets affected when enabling these peripherals?
No, I think it is the design and timing of your application.
Probably the time spent in interrupt context (UART and CAN interrupts).
I hope you are aware that "context" also includes callbacks.
2025-04-15 6:37 AM
However, I haven't actually implemented or used any communication logic yet
I’ve only generated the code via CubeMX after enabling CAN on the .ioc
I haven’t written any callbacks or even started transmitting/receiving data. So no communication is taking place, and no interrupt or callback from those peripherals is being executed at runtime.
The issue happens immediately after code generation and flashing.
P.D: Curiously, if I enable USART3 or I2C1/2, the problem does not happend and the text show up correctly
2025-04-15 6:46 AM
Profile your application.
2025-04-16 12:54 AM
Hello !
I attach the application, in the touchGFX simulator everything works correctly. As soon as I flash it it does not show the text on the screen unless I comment the CAN initialization. I will try to use a different version of touchGFX, the application is very simple and right now I just want to display a text on the screen and have CAN activated, at the moment I am not interacting with anything on the screen.
I have found some similar posts in the forum, but they didn't come to any conclusion either or the solution doesn't work in my case.
https://community.st.com/t5/stm32-mcus-touchgfx-and-gui/no-texts-shown-on-the-screen-after-cubemx-generating-code-on/m-p/203982
https://community.st.com/t5/stm32-mcus-touchgfx-and-gui/textarea-doesnt-show-any-text/m-p/664664
2025-04-16 1:47 AM
Are you sure your CAN initialisation succeeds ?
> ... when I enable peripherals like CAN, UART1 or UART2 via STM32CubeMX, and generate the code, text stops displaying on the screen.Although the rest of the graphical elements are displayed.
Are you sure your application actually triggers the graphical outputs you expect in this case ?
I would either try to debug it, or instrument the code (debug printf etc.) to verify this actually happens.
I have no experience with the TouchGfx part, though.
Perhaps your application fails to update the states of the respective GUI elements correctly, and trigger a redraw.