cancel
Showing results for 
Search instead for 
Did you mean: 

STM32WBA52 FAILED to reset/halt target MCU after TZEN=1, RDP=1

dhia_trabelsi
Associate

Hello ST,

I am working with STM32WBA52 and I am no longer able to connect to the device using STM32CubeProgrammer.

When trying to connect, I got the following error: The interface firmware FAILED to reset/halt the target MCU

A fail.txt file is also generated. The connection fails even when trying:

  • Connect under reset.
  • Different SWD frequencies.
  • PH3 (BOOT) pin forced high.

The issue appeared after changing security-related option bytes (TZEN / RDP). The device seems to boot normally, but debug access is blocked. I suspect the MCU enters Secure state early and prevents the debugger from halting the core.

Is this expected behaviour on STM32WBA when TZEN = 1 and RDP = 1 without Debug Authentication configured?

Does STM32WBA block SWD access by default in Secure mode?

Best Regards,
Dhia

3 REPLIES 3
Jocelyn RICARD
ST Employee

Hello @dhia_trabelsi ,

when enabling TrustZone and RDP Level 1 you can only connect with debugger if the secure firmware jumps to non secure.

Only way to recover if you don't have non secure firmware running, is to set BOOT0 pin to VDD to enable system bootloader.

Best regards

Jocelyn

Hello Jocelyn,

Thanks for the clarification.

In my case, I already tried forcing BOOT0 high (system bootloader mode), but STM32CubeProgrammer still cannot establish any connection (same reset/halt failure).

At this point, the device seems completely inaccessible through SWD, even under reset.

Could you please confirm:

  • Is there any recovery possible via UART/USB bootloader when TZEN=1 and RDP=1 without Debug Authentication configured?

  • Is a full regression only possible through Debug Authentication (DA), meaning the device must be considered unrecoverable otherwise?

Best Regards,
Dhia

Hello @dhia_trabelsi,

first the term Debug Authentication is not applicable to this device.

Maybe you are talking about the OEM1KEY/OEM2KEY that may be used to allow the regression.

But provisioning the keys only impact the regression phase, not the connection.

It is possible to setup option bytes to avoid booting on system bootloader like bootlock. In such case you have no way to recover using BOOT0 pin.

But in case device can boot on system bootloader, it is possible to attach and launch the regression.

Best regards

Jocelyn