Skip to main content
Associate
August 29, 2025
Solved

STM32U5 with TouchGFX Hard fault on initialization

  • August 29, 2025
  • 1 reply
  • 489 views

Hi,

I recently started working on a custom board using the STM32U5G9ZJT6Q microcontroller. I'm planning on using TouchGFX with LTDC, DMA2D and GPU2D to implement a graphical user interface and AzureRTOS as rtos.

I am encountering a problem when, in the main function, the microcontroller hard faults during the MX_TouchGFX_PreOSInit function, in particular at the FrontendHeap& heap = FrontendHeap::getInstance() call.

I am using STM32CubeIde 1.19.0 with STM32CubeMX 6.15.0 and TouchGFX 4.25.0. I also tried with TouchGFX 4.24.2 with no luck unfortunately.

Here are the screenshots of the hard fault info, stacktrace, and disassembly as shown by STM32CubeIde:

fault.png

stacktrace.png

disassembly.png

I also attached a minimal project in which I only configured the relevant intefaces and middlewares and in which the problem still occurs.

I already made sure that the CRC peripheral is enabled as suggested in other posts I found. 

 

Sorry if I made some mistakes as it is my first time posting, and thank you for any help you can provide.

Best answer by LouisB

Hello @JacopoFurci,

In CubeMX in Computing->CRC, you cant have something different from "Default Polynomial State". But after TGFX initialization, you can change the CRC polynomial state if you want to.

BR,

1 reply

LouisBBest answer
ST Employee
September 2, 2025

Hello @JacopoFurci,

In CubeMX in Computing->CRC, you cant have something different from "Default Polynomial State". But after TGFX initialization, you can change the CRC polynomial state if you want to.

BR,

Associate
September 2, 2025

Hi Louis,

that was the problem thank you. I probably changed it at some point and forgot, now it works as expected.

Thank you again for your help.

 

Best regards,

Jacopo