2025-09-08 10:07 PM
Hello Support Team,
for testing purposes i am using the H533NucleoBoard. I can load my firmware into the MCU and the firmware is running as expected. I want use the final product in ProductionState: closed.
The problem is, the firmware isn't running any longer whe changing the productionState to closed. But I am able to switch back to ProductionState: open via Regression.
Following informations:
Used Tools: Stm32CubeProgrammer V2.20.0
STLink V3 FirmwareVersion: V3J16M8
Following Settings:
TZEN: C3 (disabled) (I don't want to use TrusZone enabled)
BOOT_UBE: B4 (OEM-iRot UserFlash)
NSBOOT_LOCK : C3
SECBOOT_LOCK : 0
Sequence:
1. set product state: Provisioning
2. start provisioning
3. set product state: closed
LogFile of Provisioning process:
06:55:11:421 : reset ap 1
06:55:11:421 : Reset MCU
06:55:11:422 : Reconnecting...
06:55:11:422 : Disconnected
06:55:11:422 : ST-LINK SN : 0019002A3433511537363934
06:55:11:423 : ST-LINK FW : V3J16M8
06:55:11:423 : Board : NUCLEO-H533RE
06:55:11:423 : Voltage : 3.30V
06:55:11:423 : SWD freq : 8000 KHz
06:55:11:423 : Connect mode: Hot Plug
06:55:11:423 : Reset mode : Hardware reset
06:55:11:423 : Device ID : 0x478
06:55:11:423 : Revision ID : --
06:55:11:423 : Reconnected !
06:55:11:424 : Secure Data Provisioning Start. OBK Input file : C:\STM32H533-H573_ConfigWithPassword.obk
06:55:11:424 : ObKey::Reading STM32 descriptor ...
06:55:11:424 : STM32 Descriptor successfully read
06:55:11:424 : Programming via Debugger!
06:55:11:426 : Programming via Debugger!
06:55:11:426 : Core is not halted. Core will be halted.
06:55:11:426 : halt ap 1
06:55:11:426 : r ap 1 reg 0 0x200033E0
06:55:11:426 : r ap 1 reg 1 0x10000000
06:55:11:427 : r ap 1 reg 2 0x00000000
06:55:11:427 : r ap 1 reg 3 0x00000000
06:55:11:427 : r ap 1 reg 4 0x40005C00
06:55:11:427 : r ap 1 reg 5 0x00000000
06:55:11:427 : r ap 1 reg 6 0x00000000
06:55:11:427 : r ap 1 reg 7 0x00000000
06:55:11:427 : r ap 1 reg 8 0x00000000
06:55:11:427 : r ap 1 reg 9 0x00000000
06:55:11:427 : r ap 1 reg 10 0x00000000
06:55:11:427 : r ap 1 reg 11 0x00000000
06:55:11:427 : r ap 1 reg 12 0x00000005
06:55:11:428 : r ap 1 SP 13 0x20003BC8
06:55:11:428 : r ap 1 LR 14 0x0BF9EF63
06:55:11:428 : r ap 1 PC 15 0x0BF9E91C
06:55:11:428 : r ap 1 XPSR 16 0x01004800
06:55:11:428 : r ap 1 MSP - 0x20003BC8
06:55:11:428 : r ap 1 PSP - 0x20003BE0
06:55:11:428 : r ap 1 CR 20 0x00000000
06:55:11:429 : halt ap 1
06:55:11:429 : run ap 1
06:55:11:429 : halt ap 1
06:55:11:429 : OBKey Provisioned successfully C:\STM32H533-H573_ConfigWithPassword.obk
06:55:48:902 : Option byte command : -ob PRODUCT_STATE=114
06:55:48:903 : UPLOADING ...
06:55:48:903 : Size : 4 Bytes
06:55:48:903 : Address : 0x40022050
06:55:48:905 : Read progress:
06:55:48:905 : Data read successfully
06:55:48:905 : Time elapsed during the read operation is: 00:00:00.001
06:55:48:907 : qCmd : -ob PRODUCT_STATE=114
06:55:48:908 : PROGRAMMING OPTION BYTES AREA ...
06:55:48:911 : halt ap 1
06:55:48:911 : r ap 1 reg 15 PC 0x20034000
06:55:48:911 : run ap 1
06:55:48:929 : Database: Config 0 is active.
06:55:48:930 : Bank : 0x00
06:55:48:930 : Address : 0x40022050
06:55:48:930 : Size : 8 Bytes
06:55:48:931 : halt ap 1
06:55:48:948 : reset ap 1
06:55:48:948 : Reset MCU
06:55:48:949 : Reconnecting...
06:55:50:077 : ST-LINK SN : 0019002A3433511537363934
06:55:50:077 : ST-LINK FW : V3J16M8
06:55:50:078 : Board : NUCLEO-H533RE
06:55:50:078 : Voltage : 3.30V
06:55:50:187 : Error: Unable to get core ID
06:55:50:187 : Error: Cannot connect to access port 1! If you are trying to connect to a device with TrustZone enabled please try to connect with HotPlug mode. If you are trying to connect to a device which supports Debug Authentication with certificate or password, please open your device using it.
06:55:50:187 : ...retrying...
06:55:50:722 : ST-LINK SN : 0019002A3433511537363934
06:55:50:722 : ST-LINK FW : V3J16M8
06:55:50:722 : Board : NUCLEO-H533RE
06:55:50:723 : Voltage : 3.30V
06:55:50:832 : Error: Unable to get core ID
06:55:50:833 : Error: Cannot connect to access port 1! If you are trying to connect to a device with TrustZone enabled please try to connect with HotPlug mode. If you are trying to connect to a device which supports Debug Authentication with certificate or password, please open your device using it.
06:55:50:833 : ...retrying...
06:55:51:359 : ST-LINK SN : 0019002A3433511537363934
06:55:51:359 : ST-LINK FW : V3J16M8
06:55:51:360 : Board : NUCLEO-H533RE
06:55:51:361 : Voltage : 3.30V
06:55:51:470 : Error: Unable to get core ID
06:55:51:471 : Error: Cannot connect to access port 1! If you are trying to connect to a device with TrustZone enabled please try to connect with HotPlug mode. If you are trying to connect to a device which supports Debug Authentication with certificate or password, please open your device using it.
06:55:51:471 : ...retrying...
06:55:51:991 : ST-LINK SN : 0019002A3433511537363934
06:55:51:991 : ST-LINK FW : V3J16M8
06:55:51:992 : Board : NUCLEO-H533RE
06:55:51:993 : Voltage : 3.30V
06:55:52:102 : Error: Unable to get core ID
06:55:52:103 : Error: ST-LINK error (DEV_TCP_CMD_ERR)
06:55:52:104 : ...retrying...
06:55:52:627 : ST-LINK SN : 0019002A3433511537363934
06:55:52:627 : ST-LINK FW : V3J16M8
06:55:52:628 : Board : NUCLEO-H533RE
06:55:52:628 : Voltage : 3.30V
06:55:52:736 : Error: Unable to get core ID
06:55:52:737 : Error: ST-LINK error (DEV_TCP_CMD_ERR)
06:55:52:737 : ...retrying...
06:55:53:265 : ST-LINK SN : 0019002A3433511537363934
06:55:53:265 : ST-LINK FW : V3J16M8
06:55:53:267 : Board : NUCLEO-H533RE
06:55:53:267 : Voltage : 3.30V
06:55:53:375 : Error: Unable to get core ID
06:55:53:376 : Error: ST-LINK error (DEV_TCP_CMD_ERR)
06:55:53:376 : Error: failed to reconnect after reset !
06:55:55:529 : Database: Config 6 is active.
06:55:55:529 : Error: Unable to reconnect after setting the Option Bytes
06:55:56:312 : Error: Unable to get core ID
06:55:56:313 : fail @0xFEEEFEEE
06:55:56:314 : Error: Unable to get core ID
06:55:56:314 : Error: Unable to get core ID
06:55:56:314 : Warning: Connection to device 0x478 is lost
06:55:56:328 : Disconnected
06:55:56:328 : Disconnected from device.
//LogFile of Regression
07:02:30 : STM32CubeProgrammer API v2.20.0 | Windows-64Bits
07:02:44 : Start Debug Authentication Sequence
07:02:44 : SDMOpen : 624 : open : SDM API v1.0
07:02:44 : SDMOpen : 625 : open : SDM Library version v1.2.0
07:02:44 : open_comms : 513 : open : Asserting target reset
07:02:44 : open_comms : 517 : open : Writing magic number
07:02:44 : open_comms : 537 : open : De-asserting target reset
07:02:44 : open_comms : 584 : open : Communication with the target established successfully
07:02:44 : discovery: target ID.......................:0x478
07:02:44 : discovery: SoC ID..........................:0x00000000_32313831_33335101_00530049
07:02:44 : discovery: SDA version.....................:1.2.0
07:02:44 : discovery: Vendor ID.......................:STMicroelectronics
07:02:44 : discovery: PSA lifecycle...................:ST_LIFECYCLE_CLOSED
07:02:44 : discovery: PSA auth version................:1.0
07:02:44 : discovery: ST HDPL1 status.................:0xffffffff
07:02:44 : discovery: ST HDPL2 status.................:0xffffffff
07:02:44 : discovery: ST HDPL3 status.................:0xffffffff
07:02:44 : discovery: Token Formats...................:0x200
07:02:44 : discovery: Certificate Formats.............:0x201
07:02:44 : discovery: cryptosystems...................:ST Password
07:02:44 : discovery: ST provisioning integrity status:0xeaeaeaea
07:02:44 : discovery: permission if authorized...........:Full Regression
07:02:58 : UR connection mode is defined with the HWrst reset mode
07:02:58 : UR connection mode is defined with the HWrst reset mode
07:02:58 : Start Debug Authentication Sequence
07:02:58 : SDMOpen : 624 : open : SDM API v1.0
07:02:58 : SDMOpen : 625 : open : SDM Library version v1.2.0
07:02:58 : open_comms : 513 : open : Asserting target reset
07:02:58 : open_comms : 517 : open : Writing magic number
07:02:58 : open_comms : 537 : open : De-asserting target reset
07:02:58 : open_comms : 584 : open : Communication with the target established successfully
07:02:58 : [00%] discovery command
07:02:58 : [10%] sending discovery command
07:02:58 : [20%] receiving discovery
07:02:58 : [40%] loading credentials
07:02:58 : [50%] sending challenge request
07:02:58 : [60%] receiving challenge
07:02:58 : SDMAuthenticate : 1391 : client : Found 1 certificates
07:02:58 : [80%] sending ST password
07:02:58 : [90%] receiving response
07:02:58 : [100%] authentication successful
07:02:58 : SDMAuthenticate : 1456 : client : Authentication successful
07:02:58 : Debug opened successfully. the target will be connected.
07:02:58 : Disconnected from device.
07:02:58 : ST-LINK SN : 0019002A3433511537363934
07:02:58 : ST-LINK FW : V3J16M8
07:02:58 : Board : NUCLEO-H533RE
07:02:58 : Voltage : 3.31V
07:02:58 : SWD freq : 8000 KHz
07:02:58 : Connect mode: Under Reset
07:02:58 : Reset mode : Hardware reset
07:02:58 : Device ID : 0x478
07:02:58 : Revision ID : --
07:02:58 : Debug in Low Power mode enabled.
07:02:58 : SFSP Version: v1.2.0
07:02:59 : UPLOADING OPTION BYTES DATA ...
07:02:59 : Bank : 0x00
07:02:59 : Address : 0x40022050
07:02:59 : Size : 8 Bytes
07:02:59 : Bank : 0x01
07:02:59 : Address : 0x40022070
07:02:59 : Size : 16 Bytes
07:02:59 : Bank : 0x02
07:02:59 : Address : 0x40022080
07:02:59 : Size : 16 Bytes
07:02:59 : Bank : 0x03
07:02:59 : Address : 0x400220e0
07:02:59 : Size : 16 Bytes
07:02:59 : Bank : 0x04
07:02:59 : Address : 0x400221e0
07:02:59 : Size : 16 Bytes
07:02:59 : Bank : 0x05
07:02:59 : Address : 0x40022090
07:02:59 : Size : 8 Bytes
07:02:59 : Bank : 0x06
07:02:59 : Address : 0x400220f0
07:02:59 : Size : 8 Bytes
07:02:59 : Bank : 0x07
07:02:59 : Address : 0x400221f0
07:02:59 : Size : 8 Bytes
07:02:59 : Bank : 0x08
07:02:59 : Address : 0x400220f8
07:02:59 : Size : 8 Bytes
07:02:59 : Bank : 0x09
07:02:59 : Address : 0x400221f8
07:02:59 : Size : 8 Bytes
07:02:59 : UPLOADING ...
07:02:59 : Size : 1024 Bytes
07:02:59 : Address : 0x8000000
07:02:59 : Read progress:
07:02:59 : Data read successfully
07:02:59 : Time elapsed during the read operation is: 00:00:00.012
I have no idea, what I am doing wrong.
Maybe anyone can help me.
Thanks in advance.
best regards
jhoerd
2025-09-09 8:37 AM
Hello @jhoerd ,
If your application starts correctly after power on in OPEN state, the only reason I know it could fail when you close the device is because you use the the DWT->CYCCNT for some timeout.
The DWT as well as all debug peripherals are not available when product is closed.
Best regards
Jocelyn