Skip to main content
Visitor
July 28, 2026
Question

STM32U5 TrustZone(Application only starts after Hardware Reset or Debug after programming)

  • July 28, 2026
  • 2 replies
  • 84 views

Hi everyone,

I am working with an STM32U5 device and have enabled TrustZone (TZEN = 1)  using STM32PROGRAMMER

I created both the Secure and Non-Secure projects, and they compile and program successfully.

Problem

After downloading the firmware from STM32CubeIDE:

  • Programming completes successfully.
  • The application does not start automatically.
  • My LED does not blink.

However:

  • If I press the hardware RESET button, the LED immediately starts blinking.
  • If I start a Debug session, the LED also starts blinking.

So the firmware itself appears to be correct because it works after a reset.

What I have verified

  • TrustZone (TZEN) is enabled.
  • Secure and Non-Secure projects are generated by CubeMX.
  • Secure project jumps to the Non-Secure application.
  • Programming finishes without any errors.
  • The issue only occurs immediately after programming.
  • Without TrustZone, the application starts automatically after programming.

My question

Is this expected behaviour with STM32U5 TrustZone?

Has anyone experienced the same issue where the application only starts after a hardware reset?

Could this be related to:

  • Secure boot sequence?
  • SECBOOTADD0 / NSBOOTADD0 option bytes?
  • Debugger reset mode (Software Reset vs Hardware Reset)?
  • STM32CubeIDE download behaviour?
  • Something else in the TrustZone boot process?

I would appreciate any suggestions on what to check next.

Thank you.

2 replies

Moktar SELLAMI
ST Employee
August 26, 2026

Hello ​@STM32U5,
Could you please share the STM32U5 specific device number and the option byte configuration ? 

Also did you configure the secure water mark in STM32CubePorgammer  ? 
Best regards 
Moktar SELLAMI

Bubbles
ST Employee
August 27, 2026

Hi,

this is probably related to secure state intrusion detection. With just soft reset after programming, the debugger is still detected, so running normally is not possible. Hard reset will refresh the debugger detection and allow the code to work. Going to debug session is also possible, naturally, when the debugger is allowed by the RDP.

BR,

J

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.