STM32U5 - GPIO_IOToggle_TrustZone example gets stuck in HardFault-handler
I followed the GPIO_IOToggle_TrustZone Example for STM32U5, which is documented in UM2883 (STM32CubeU5GettingStarted.pdf; section 5.1.1).
The development board used is a NUCLEO-U575ZI-Q.
Details:
- I've set the TZEN-Bit in FLASH_OPTR using STM32CubeProg successfully
- Used STM32CubeIDE to import existing project (%USERPROFILE%\STM32Cube\Repository\STM32Cube_FW_U5_V1.0.0\Projects\NUCLEO-U575ZI-Q\Examples\GPIO\GPIO_IOToggle_TrustZone) from filesystem into default workspace (%USERPROFILE%\STM32CubeIDE\workspace_1.7.0)
- sticked to the guide in UM2883:
- Open the STM32CubeIDE toolchain
- Open Multi-projects workspace file .project
- Rebuild xxxxx_Secure project
- Rebuild xxxxx_NonSecure project
- Launch Debug as STM32 Cortex-M C/C++ Application for the secure project.
- In the Edit configuration window, select the Startup panel, and add load image and symbols of the non-secure project.
- Be careful, the non-secure project has to be loaded before the secure project.
- Then click "OK"
- Run the example on debug perspective.
When I set a breakpoint in HAL_SYSTICK_Callback (where the LED is toggelt) this breakpoint is never hit. Instead, when initialization is done, the HardFault_Handler() in %USERPROFILE%\STM32Cube\Repository\STM32Cube_FW_U5_V1.0.0\Projects\NUCLEO-U575ZI-Q\Examples\GPIO\GPIO_IOToggle_TrustZone\Secure\Src is entered.
All steps were checked by one of my colleagues, so my last hope is this expert forum here.
