How to write word 0 in OTP using STM32_Programmer_CLI ?
Hi,
I have a SoM based on STM32MP135c (QSMP-1351) and I try to enable the secure boot using STM32_Programmer_CLI (STM32CubeProgrammer v2.22.0)
Here is the flash layout file used before updating OTP:
#opt Id Name Type Device Offset Binary
- 0x01 fsbl-boot Binary none 0x0 tf-a-loader.stm32
- 0x03 fip-boot FIP none 0x0 fip-loader.bin
I can write PKHTH without any issue:
STM32_Programmer_CLI -c port=usb1 -otp write word=0x18 value=0x????????
STM32_Programmer_CLI -c port=usb1 -otp write word=0x19 value=0x????????
STM32_Programmer_CLI -c port=usb1 -otp write word=0x1a value=0x????????
STM32_Programmer_CLI -c port=usb1 -otp write word=0x1b value=0x????????
STM32_Programmer_CLI -c port=usb1 -otp write word=0x1c value=0x????????
STM32_Programmer_CLI -c port=usb1 -otp write word=0x1d value=0x????????
STM32_Programmer_CLI -c port=usb1 -otp write word=0x1e value=0x????????
STM32_Programmer_CLI -c port=usb1 -otp write word=0x1f value=0x????????
When I want to lock device, I use the command:
STM32_Programmer_CLI -c port=usb1 -otp write word=0x00 value=0x00000028
But I have the following error:
Warning: Word 0 has the access READ ONLY, it will not be programmed
Here is the status of word 0:
STM32_Programmer_CLI -c port=usb1 -otp displ
---------------------------------------------------------------------------
ID | value | status
---------------------------------------------------------------------------
000 | 0x00000017 | 0x30000000
|_[28] Shadow write sticky lock
|_[29] Shadow read sticky lock
The syntax to change the status of word 0 is not clear even by reading wiki : https://wiki.st.com/stm32mpu/wiki/STM32CubeProgrammer_OTP_management#Examples_with_STM32Programmer
What is the exact command (or list of commands) to make word 0 writable using CLI ?
Regards,
Sebastien
