Skip to main content
Daniel L
Associate III
September 5, 2019
Solved

STM32WB OTP Programming

  • September 5, 2019
  • 4 replies
  • 2562 views

Hi All,

I would like to use the OTP memory in my current project, but I can not find any app notes or user manuals on how to program it. Is it supported by STM32 Cube Programmer CLI? There is no reference to it for the STM32WB OTP in UM2237.

Thanks,

Daniel

This topic has been closed for replies.
Best answer by Remi QUINTIN

The OTP area is part of the system memory that can be accessed like any non-secure flash area.

The only key point when writing to this 1KB (0x1FFF 7000 - 0x1FFF 73FF) area is that you can only write it once.

As it is not a securable area, OTPs are only used to log non-critical information like information on the device or the BDaddress for example.

4 replies

Remi QUINTIN
Remi QUINTINBest answer
ST Technical Moderator
September 6, 2019

The OTP area is part of the system memory that can be accessed like any non-secure flash area.

The only key point when writing to this 1KB (0x1FFF 7000 - 0x1FFF 73FF) area is that you can only write it once.

As it is not a securable area, OTPs are only used to log non-critical information like information on the device or the BDaddress for example.

Remi QUINTIN
ST Technical Moderator
September 26, 2019

​You can also have a look at the CubeProgrammer user manual in the chapter 5.2.11 OTP programming.

Daniel L
Daniel LAuthor
Associate III
September 26, 2019

Hi Remi, I have successfully programmed the OTP of the STM32WB using the w32 command.

STM32_Programmer_CLI.exe -c port=usb1 -w32 0x1FFF7000 0x12345678

Chapter 5.2.11 on OTP Programming is under the MPU section of the document. Is this still relevant to the STM32WB?

Remi QUINTIN
ST Technical Moderator
September 27, 2019

​Good!!!

Indeed the chapter was related to OTPs on MPU, my mistake!!. In fact, for STM32WB devices, it is a simple Flash access in the OTP area.