Skip to main content
Associate II
December 27, 2024
Solved

How To Flash OTP Using STM32CubeProgrammer

  • December 27, 2024
  • 3 replies
  • 1305 views

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. 



3 replies

Graduate
May 13, 2025

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

Senior III
May 13, 2025

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
Technical Moderator
May 14, 2025
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.NEW ! Sidekick STM32 AI agent, see here