Skip to main content
Associate II
Dec 27, 2024 11:00 PM UTC
Solved

How To Flash OTP Using STM32CubeProgrammer

Hello,

I have tried following the https://wiki.st.com/stm32mpu/wiki/STM32CubeProgrammer_OTP_management to achieve this.

I have tried configuring 
CFG_BSEC_PTA=y CFG_STM32_BSEC_WRITE=y CFG_WITH_USER_TA=y
into the meta-st-stm32mp bsp and verified that it was being added to the make. 

I then did a minimal flashlayout to get to uboot. I have tried multiple setting/configs but I always get the same error when i run the command; STM32_Programmer_CLI -c port=usb1 -otp displ

optee optee: TA_NVMEM invoke failed TEE err: ffff0006, err:0
Error: OTP read issue -5
dfu_read: Failed to fill buffer

What is the one thing that I am missing here? My goal is to be able to flash word 3, 5, & 6. Any help would be appreciated, thank you. 



This topic has been closed for replies.
PatrickF
PatrickFBest answer
ST Employee
May 14, 2025 4:41 PM UTC

Hi,

Maybe try this lightweight alternative

https://wiki.st.com/stm32mpu/wiki/STM32PRGFW-UTIL

https://github.com/STMicroelectronics/STM32PRGFW-UTIL/blob/main/README.md

 

Regards.

In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent

3 replies

Graduate
May 13, 2025 2:36 PM UTC

Hi, were you able to figure this out? I'm seeing this problem as well.

Senior III
May 13, 2025 3:36 PM UTC

Check if the UUID for the NVMEM TA in OP-TEE matches the one expected by the STM32_Programmer_CLI. If the UUIDs don’t match, the invocation will fail.

Check the UUID in your OP-TEE TA source (or in ta/arm-plat-stm32mp1/nvmem/uuid.c) and compare with what the STM32_Programmer_CLI expects.

PatrickF
PatrickFBest answer
ST Employee
May 14, 2025 4:41 PM UTC
In order to give better visibility on the answered topics, please click on 'Best Answer' on the reply which solved your issue or answered your question.Tip of the day: Try Sidekick STM32 AI agent