STM32H7RS Debug Authentication Failed – Timeout while receiving response after signing token
Hello ST Community,
I am working with an STM32H7S78-DK board and trying to perform Debug Authentication using STM32CubeProgrammer v2.21.0.
The Discovery sequence succeeds successfully, and the target is detected correctly. However, the Debug Authentication fails after selecting the required permission.
Environment
- Board: STM32H7S78-DK
- STM32CubeProgrammer: v2.21.0
- SDM Library: v1.2.0
- SDA version: 2.0.0
- PSA lifecycle:
ST_LIFECYCLE_CLOSED - PSA authentication version:
1.0 - Cryptosystem:
Ecdsa-P256 SHA256 - Key:
Keys/key_3_leaf.pem - Certificate:
Certificates/cert_leaf_chain.b64 - Password:
Binary/password.bin
Discovery result
The discovery command completes successfully
-------------------------------------------------------------------
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 : 584 : open : Communication with the target established successfully
response_packet_lock
discovery: target ID.......................:0x485
discovery: SoC ID..........................:0x00000000_34323433_3034510B_00270059
discovery: SDA version.....................:2.0.0
discovery: Vendor ID.......................:STMicroelectronics
discovery: PSA lifecycle...................:ST_LIFECYCLE_CLOSED
discovery: PSA auth version................:1.0
discovery: ST HDPL1 status.................:0xa
discovery: ST HDPL2 status.................:0xa
discovery: ST HDPL3 status.................:0x0
discovery: Token Formats...................:0x200
discovery: Certificate Formats.............:0x201
discovery: cryptosystems...................:Ecdsa-P256 SHA256
discovery: ST provisioning integrity status:0xeaeaeaea
discovery: permission if authorized...........:(a/14) ==> Full Regression
discovery: permission if authorized...........:(b/2) ==> Level 3 Intrusive Debug
discovery: permission if authorized...........:(c/1) ==> Level 2 Intrusive Debug
discovery: permission if authorized...........:(d/0) ==> Level 1 Intrusive Debug
discovery: permission if authorized...........:(e/127) ==> Forced Download
To select multiple permission/actions:
Using numerical values: List the needed bit numbers, separated by commas without spaces.
Using symbolic letters: List the needed letters by concatenating them without separators.
Debug Authentication: Discovery Success
-------------------------------------------------------------------
STM32CubeProgrammer v2.21.0
-------------------------------------------------------------------
Key file path submitted : Keys/key_3_leaf.pem
Certificate file path submitted : Certificates/cert_leaf_chain.b64
Password file path submitted : Binary/password.bin
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 : 584 : open : Communication with the target established successfully
response_packet_lock
discovery: permission if authorized...........:(a/14) ==> Full Regression
discovery: permission if authorized...........:(b/2) ==> Level 3 Intrusive Debug
discovery: permission if authorized...........:(c/1) ==> Level 2 Intrusive Debug
discovery: permission if authorized...........:(d/0) ==> Level 1 Intrusive Debug
discovery: permission if authorized...........:(e/127) ==> Forced Download
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 : 584 : open : Communication with the target established successfully
After discovery, I run Debug Authentication with the key, certificate chain and password.
The authentication reaches the token-signing stage:
[00%] discovery command
[10%] sending discovery command
[20%] receiving discovery
response_packet_lock
[40%] loading credentials
Keys/key_3_leaf.pem
Certificates/cert_leaf_chain.b64
[50%] sending challenge request
[60%] receiving challenge
response_packet_lock
[70%] signing token
Please select the possible permission/actions:
(a/14) Full Regression
(b/2) Level 3 Intrusive Debug
(c/1) Level 2 Intrusive Debug
(d/0) Level 1 Intrusive Debug
(e/127) Forced Download
a
the submitted permissions are : a
SDMAuthenticate : 1391 : client : Found 3 certificates
response_packet_lock
Timeout while receiving response...
SDMAuthenticate : 1415 : client : Unexpected response status 3Issue
The target communication is established successfully and the Discovery command works. The credentials are also loaded and 3 certificates are found.
However, immediately after submitting permission a (Full Regression), the target does not provide the expected response:
Timeout while receiving response...
Unexpected response status 3I have also tried the procedure multiple times, but I consistently get the same authentication failure.
Could someone please help me understand:
- What does
Unexpected response status 3indicate in this Debug Authentication sequence? - Why would Discovery succeed but authentication fail after the token is signed?
- Could this be related to the certificate chain, key/certificate provisioning, password, lifecycle state, or provisioning integrity status
0xeaeaeaea? - Is there any additional provisioning or configuration step required before Debug Authentication can successfully authorize Full Regression?
- Are there any specific reset timing requirements for STM32H7RS during the authentication sequence?
I would appreciate any guidance on how to identify the exact cause of the authentication failure.
Thank you.
