cancel
Showing results for 
Search instead for 
Did you mean: 

How to wire stm32c031f6 OTP

RJ3
Associate

HI:

 I want to write the board SN, REV, TIME to STM32C031F6 OTP area 0x1FFF7000~0x1FFF705F, which is almost 96bytes to write, from the stm32cubeprogrammer manual -W64 command can to write, but is needs to be repeated 6 times, right?

Also from the manual there have write file for the OTP command "fwrite", how do i understand parameter "word"  , can you tell me what command to use?

"STM32_Programmer_CLI.exe --connect port=usb1 -otp fwrite example.bin word=??"

 

example data:

47333934302D36313833304130314653323331353030303100FF71D2FFFFFFFF
66138B6F00FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF3106FFFFFFFF
41303100FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD115FFFFFFFF

 

Can you tell me how it would be easier to write these data? thanks!

 

2 REPLIES 2

You could have a function or mode in your own software that writes the OTP settings you provide. You could presumably test if the are as expected or not.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Aziz BRIGUI
ST Employee

Hello @RJ3

Sorry for the late reply,

The "-otp" CLI is specific to the STM32MP series. For writing to OTP memory using CubeProgrammer on an STM32C031, you can simply use the following CLI: 

>STM32_Programmer_CLI -c port=usb1 -d OTP_Data.bin 0x1FFF7000 

 Aziz


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.