Showing results for 
Search instead for 
Did you mean: 

STM32H503 - crash when attempting to provision password for DA

Associate II

I'm using a working + tested board with the STM32H503KB; connecting over SWD via an ST-Link board. I'm on MacOS and using version 2.16 of STM32CubeProgrammer.

I am attempting to use the programmer to write a SHA256 password hash to OTP memory, in order to configure debug authentication. Without this, I cannot progress the product state to Provisioning or higher without losing device access. I am finding I am unable to perform this through either the GUI or CLI.

First, I'll describe what happens in the GUI. I successfully connect to my target, enter the Secure Programming section, and click the PROV tab. I enter a password, choose an existing directory for the password file to be saved, and click Start Provisioning. Here is a screenshot just before I click the button.


When I click Start Provisioning, the window instantly closes; no error dialog is shown.

When running the application from the terminal, executing /Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/ , and performing the same operation, the log shows this:



CubeProgrammer version: 2.16.0
Path CubeProgrammer version: : /Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/
# A fatal error has been detected by the Java Runtime Environment:
# SIGBUS (0xa) at pc=0x0000000148b979c5, pid=56864, tid=0x0000000000000103
# JRE version: OpenJDK Runtime Environment (8.0_382-b06) (build 1.8.0_382-b06)
# Java VM: OpenJDK 64-Bit Server VM (25.382-b06 mixed mode bsd-amd64 compressed oops)
# Problematic frame:
# C [libCubeProgrammer_API.dylib+0x22b9c5] CryptoOTP::createFiles(QString, unsigned char*, QString)+0x1f5
# Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
# An error report file with more information is saved as:
# /Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/
# If you would like to submit a bug report, please visit:
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
[1] 56864 abort


When I try to use the CLI instead, I get a similar error. I execute:


/Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/ -c port=SWD -pwd value=[REDACTED] path=/Users/tcb/stm32h5_da


and get this output:


STM32CubeProgrammer v2.16.0

ST-LINK SN : 066BFF555449836687241516
Board : NUCLEO-F302R8
Voltage : 0.00V
Warning: Connection to AP 0 requested and failed, Connection established with AP 1

SWD freq : 4000 KHz
Connect mode: Normal
Reset mode : Software reset
Device ID : 0x474
Revision ID : Rev Y
Device name : STM32H50x
Flash size : 128 KBytes
Start Address : 8000000
Device type : MCU
Device CPU : Cortex-M33
BL Version : 0xE2
SFSP Version: v1.4.0
Debug in Low Power mode enabled

the chosen password is : [REDACTED]
the chosen directory is : /Users/tcb/stm32h5_da
Password hash Calculation...
[1] 57122 bus error -c port=SWD -pwd value=[REDACTED] path=/Users/tcb/stm32h5_da


If any ST folks are reading this; this is blocking the preparation for an important product manufacturing run, so I would really appreciate some help here.

Any suggestions welcome. Thank you.


Edit: I have attached an error log produced by the GUI app during the crash.

Chloe Meunier
ST Employee
Associate II

@Chloe Meunier ,

Thanks for your reply.

The wiki article does not cover my use case. Our development machines are running macOS, and we do not use IAR Workbench.

Referring to my original post, there is clearly a bug in the macOS version of STM32CubeProgrammer. I would really appreciate it if you could raise this with the relevant team!

Chloe Meunier
ST Employee



could you please test with an older version of STM32CubeProgrammer, like v2.13.0 ?


Best Regards


Associate II

I have a similar problem on windows. Using GUI it stalls on "Password hash Calculation..." and then nothing happens. It doesn't even crash.
Using CLI it outputs the "HASHED : [REDACTED]" but then the command exits AKA nothing happens.

Im providing the log file of CLI attempt vith verbose level 3.


As suggested, I tried with V2.13.0
The CLI password programming was succesfull after which I set the PRODUCT_STATE to provisioned. That resulted in "Error : failed to reconnect after reset !"

After this the uC isnt detectable by STLink in DA discovery or any other way.

it seems you are using a NUCLEO-F302R8?




Hi Chloe,

thank you for your reply.

I'm using STM32H503EBY6TR (Rev Y) on a custom hardware board.


Kind regards,

Mataj Zandona

Chloe Meunier
ST Employee

To provision the password you can use the commands used in the script provisioning.bat.
This script once user password (hash of the password) created, launches the script password_provisioning.bat, you can try to reproduce this?





I did try that script with no luck, just bricks the chip every time.

I have opened a support ticket and will continue there, thank you!


If and when I have the solution I will follow up here to help others with the same problem.



Mataj Zandona