STM32H503 - crash when attempting to provision password for DA
- April 17, 2024
- 5 replies
- 2661 views
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/STM32CubeProgrammer.app/Contents/MacOs/bin/STM32CubeProgrammer , and performing the same operation, the log shows this:
[..............]
CubeProgrammer version: 2.16.0
Path CubeProgrammer version: : /Applications/STMicroelectronics/STM32Cube/STM32CubeProgrammer/STM32CubeProgrammer.app/Contents/MacOs/bin/version
HASHED : [REDACTED]
#
# 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/STM32CubeProgrammer.app/Contents/MacOs/bin/hs_err_pid56864.log
#
# If you would like to submit a bug report, please visit:
# https://bell-sw.com/support
# 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/STM32CubeProgrammer.app/Contents/MacOs/bin/STM32_Programmer_CLI -c port=SWD -pwd value=[REDACTED] path=/Users/tcb/stm32h5_da
and get this output:
-------------------------------------------------------------------
STM32CubeProgrammer v2.16.0
-------------------------------------------------------------------
ST-LINK SN : 066BFF555449836687241516
ST-LINK FW : V2J43M28
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...
HASHED : [REDACTED]
[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.
