cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to perform Regression or Debug Authentication on STM32H5

beartronics
Associate II

Hello,

I've been working on Provisioning my STM32H563 product and after 3 weeks of not touching the project, I am unable to perform Full Regression or Debug Authentication on my password-provisioned Nucleo Board. I tried using the generated bash scripts from CubeIDE/MX (which are using STM32_Programmer_CLI) and also STM32CubeProgrammer GUI.

I remember before the vacation, I could open and close the Board at will. I always used the same password(.bin).

Provisioning always happened using the generated provisioning.sh script.

Here is the Output of STM32CubeProgrammer (I found it has more info than dbg_auth.sh), after trying Discovery and Full Regression:

------------------------------------------------------------------

17:21:34 : Start Debug Authentication Sequence
17:21:34 : SDMOpen : 609 : open : SDM API v1.0
17:21:34 : SDMOpen : 610 : open : SDM Library version v1.1.0
17:21:34 : open_comms : 501 : open : Asserting target reset
17:21:34 : open_comms : 505 : open : Writing magic number
17:21:34 : open_comms : 515 : open : De-asserting target reset
17:21:34 : open_comms : 567 : open : Communication with the target established successfully
17:21:34 : discovery: target ID.......................:0x484
17:21:34 : discovery: SoC ID..........................:0x00000000_00000000_00000000_00000000
17:21:34 : discovery: SDA version.....................:2.4.0
17:21:34 : discovery: Vendor ID.......................:STMicroelectronics
17:21:34 : discovery: PSA lifecycle...................:ST_LIFECYCLE_CLOSED
17:21:34 : discovery: PSA auth version................:1.0
17:21:34 : discovery: ST HDPL1 status.................:0xffffffff
17:21:34 : discovery: ST HDPL2 status.................:0xffffffff
17:21:34 : discovery: ST HDPL3 status.................:0xffffffff
17:21:34 : discovery: Token Formats...................:0x200
17:21:34 : discovery: Certificate Formats.............:0x201
17:21:34 : discovery: cryptosystems...................:ST Password
17:21:34 : discovery: ST provisioning integrity status:0xeaeaeaea
17:21:34 : discovery: permission if authorized...........:Full Regression
17:21:42 : UR connection mode is defined with the HWrst reset mode
17:21:42 : Start Debug Authentication Sequence
17:21:42 : SDMOpen : 609 : open : SDM API v1.0
17:21:42 : SDMOpen : 610 : open : SDM Library version v1.1.0
17:21:42 : open_comms : 501 : open : Asserting target reset
17:21:42 : open_comms : 505 : open : Writing magic number
17:21:42 : open_comms : 515 : open : De-asserting target reset
17:21:42 : open_comms : 567 : open : Communication with the target established successfully
17:21:42 : [00%] discovery command
17:21:42 : [10%] sending discovery command
17:21:42 : [20%] receiving discovery
17:21:42 : [40%] loading credentials
17:21:42 : [50%] sending challenge request
17:21:42 : [60%] receiving challenge
17:21:42 : SDMAuthenticate : 1298 : client : Found 1 certificates
17:21:42 : [80%] sending ST password
17:21:42 : [90%] receiving response
17:21:42 : Error: Debug Authentication Failed
17:21:42 : Disconnected from device.
17:21:42 : ST-LINK SN : 0032002B3132511238363431
17:21:42 : ST-LINK FW : V3J15M6
17:21:42 : Board : NUCLEO-H563ZI
17:21:42 : Voltage : 3.25V
17:21:42 : 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.
----------------------------------------------------------------------

What could be the issue here?

Thank you and best regards,
Stefan

2 REPLIES 2
STea
ST Employee

Hello @beartronics ,

are you sure you are selecting the same key that you used before make sure the path tp the key is correct maybe it is a naming issue.

also did you make sure that you had an application running in the non-secure world if you have TZ enabled.
make sure you check and follow the recommended steps in the related WIKI series:

Category:How to start with DA on STM32H5 - stm32mcu

Regards

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Hello @STea ,

thank you for the reply. Sorry for duplicating this post - this one here was originally marked as spam, which is why I made another one:
https://community.st.com/t5/stm32-mcus-security/stm32h563-unable-to-regress-or-debug-authenticate

Unfortunately, your suggestions do not apply to my problem. Thanks anyways!

Best regards,
Stefan