Skip to main content
Visitor II
April 22, 2024
Solved

How to wire stm32c031f6 OTP

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!

 

This topic has been closed for replies.
Aziz BRIGUI
Aziz BRIGUIBest answer
ST Technical Moderator
May 20, 2024

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.

2 replies

Tesla DeLorean
Guru
April 22, 2024

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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
Aziz BRIGUI
Aziz BRIGUIBest answer
ST Technical Moderator
May 20, 2024

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.