2025-05-14 6:01 AM
When experimenting with secure boot on the STM32U5A9J-DK, I was following the SBSFU example for the B-U585I-IOT02A board available from STM32CubeU5, but somewhere along the line, I might have bricked it. I can no longer connect to STM32CubeProgrammer or the STLink utility. I get Error: ST-LINK error (DEV_TARGET_NOT_HALTED). I've tried changing the Mode to "Under reset" and "Hot plug" and the Reset mode to "Hardware reset", "Software reset" and "Core reset" (and all of the combinations), but it will not connect successfully. I am using STM32CubeProgrammer v2.19.0 on Windows 11.
Is there a way to recover from this situation?
Solved! Go to Solution.
2025-05-14 8:39 AM - edited 2025-05-14 8:40 AM
Hello @alanl
First you should check this application note:
Introduction to Arm® TrustZone® features on STM32L5, STM32U5, and STM32U3 MCUs - Application note.
Especially section 9.1.2 TZEN/RDP regression with a boot from RSS. What happened on your MCU is that you activated TrustZone and set RDP to 0x55 => You can only connect in Hotplug mode via STM32CubeProgrammer and you can only perform a TZEN/RDP regression (You cannot change each option byte on its own).
Make sure conditions in 9.1.2 section are met, then set RDP to 1, then deactivate RDP and TZEN together.
PS: 0x55 is not an invalid RDP value, please check 11 Development recommendations using TrustZone if you're going to use TrustZone or before proceeding with any SFI or SBSFU application on STM32U5.
Hope you find this helpful.
Aziz
2025-05-14 7:28 AM
Some additional information here:
I just set BOOT0 to 1, and I am now able to connect with STM32CubeProgrammer with Mode=Hot plug. I now see that the RDP value is an invalid value of 55. When I tried to set it to AA, (Level 0, no protection), I get the following error:
Error: Option Byte Programming failed Or modified by application after OB_LAUNCH.
How do I successfully set the RDP value back to AA?
2025-05-14 8:39 AM - edited 2025-05-14 8:40 AM
Hello @alanl
First you should check this application note:
Introduction to Arm® TrustZone® features on STM32L5, STM32U5, and STM32U3 MCUs - Application note.
Especially section 9.1.2 TZEN/RDP regression with a boot from RSS. What happened on your MCU is that you activated TrustZone and set RDP to 0x55 => You can only connect in Hotplug mode via STM32CubeProgrammer and you can only perform a TZEN/RDP regression (You cannot change each option byte on its own).
Make sure conditions in 9.1.2 section are met, then set RDP to 1, then deactivate RDP and TZEN together.
PS: 0x55 is not an invalid RDP value, please check 11 Development recommendations using TrustZone if you're going to use TrustZone or before proceeding with any SFI or SBSFU application on STM32U5.
Hope you find this helpful.
Aziz
2025-05-14 10:01 AM
Thank you, Aziz. I am back up and running!