2026-05-25 11:22 PM
Test bed:
- Nucleo-H503 & Nucleo-H533
- Few WeAct H523 connected via Waveshare STLink v2 mini (4 wires only)
- my own H503 based controller connected via cheap STLink v2 clones (4 wires only)
- I am using STM32_Programmer_CLI v2.21.0 / Ubuntu 24.04 LTS
Idea - close MCU with password DA and regression only.
1) I have developed Python script to create password.bin and DA.obk files
2) with Nucleo-H533 everything works fine, I can place MCU in PROVISIONING state, program OBK, and do the regression immediately or after switching to CLOSED state.
3) H523 I can switch to PROVISIONING, program OBK, switch to CLOSED, but can not do any regression from any state - DISCOVER fails. Now I have 2 boards "bricked"
4) H503 similarly. I can write OTP, verify that, but after switching to PROVISION discovery fails.Here I have 3 boards "bricked"
But as I am using the same password all the time I still hope I will be able to regress every MCUs I played with.
Here is example using H523 in 0x17 state
$ STM32_Programmer_CLI -c port=swd sn=50FF6D065052784825260567 mode=hotplug -ob displ
-------------------------------------------------------------------
STM32CubeProgrammer v2.21.0
-------------------------------------------------------------------
ST-LINK SN : 50FF6D065052784825260567
ST-LINK FW : V2J47S7
Board : --
Voltage : 3.26V
SWD freq : 4000 KHz
Connect mode: Hot Plug
Reset mode : Software reset
Device ID : 0x478
Revision ID : --
Device name : STM32H533/523
Flash size : 256 KBytes
Device type : MCU
Device CPU : Cortex-M33
BL Version : 0xE2
SFSP Version: v1.2.0
Debug in Low Power mode enabled
UPLOADING OPTION BYTES DATA ...
Bank : 0x00
Address : 0x40022050
Size : 8 Bytes
And failed discovery but also regression (the same way)
~$ STM32_Programmer_CLI -c port=swd sn=50FF6D065052784825260567 mode=hotplug debugauth=2
-------------------------------------------------------------------
STM32CubeProgrammer v2.21.0
-------------------------------------------------------------------
Start Debug Authentication Sequence
Open SDM Lib
SDMOpen : 624 : open : SDM API v1.0
SDMOpen : 625 : open : SDM Library version v1.2.0
open_comms : 513 : open : Asserting target reset
open_comms : 517 : open : Writing magic number
open_comms : 537 : open : De-asserting target reset
open_comms : 573 : open : No response from the target
open_comms : 574 : open : The target is unable to boot on RSS_DA or is in OPEN mode
open_comms : 575 : open : Failed to open communication with the target
Error:
Debug Authentication: Discovery Failed What is happening? How can i overcome the problems?
Are there any hardware related prerequisites? I.e. STLink v3 works but STLink v2, sometimes?
2026-05-25 11:36 PM
It is due to the clones of the ST-LINK/V2, which are not supported, as they contain at least illegal firmware and probably also a fake STM32F103. With a genuine ST-LINK, you avoid exactly these problems.
Regards
/Peter