cancel
Showing results for 
Search instead for 
Did you mean: 

How To Flash OTP Using STM32CubeProgrammer

ChrisRCAL
Associate II

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. 



1 ACCEPTED SOLUTION

Accepted Solutions
PatrickF
ST Employee

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 'Accept as Solution' on the reply which solved your issue or answered your question.

View solution in original post

3 REPLIES 3
gilgerca
Associate

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

ahsrabrifat
Senior

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
ST Employee

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 'Accept as Solution' on the reply which solved your issue or answered your question.