首页 > 其他 > 详细

STM32WB 信息块之OTP

时间:2019-05-09 11:55:23      阅读:184      评论:0      收藏:0      [点我收藏+]

1、OTP Area范围:0x1FFF 7000 - 0x1FFF 73FF 大小1 K

2、OTP描述

1 KB (128 double words) OTP (one-time programmable) for user data.The OTP data cannot be erased and can be written only once.If only one bit is at 0, the entire double word (64 bits) cannot be written anymore, even with the value 0x0000 0000 0000 0000.

The OTP area cannot be read when RDP level is 1 and boot source is not Flash memory user area.

Flash memory or OTP programming is done with a double-word granularity (64 bits).In order to save OTP bytes (1 K in the STM32WB Series), the load capacitance value on 6 bits can be appended to a 64-bit wide structure with other personalization data (such as the Bluetooth® device address, the MAC short address, the product specific code, the key).

推荐的OTP编程结构体:

typedef __packed struct
{
  uint8_t additional _data[6]; /* 48 bits */
  uint8_t hse_tuning; /* Load capacitance value */
  uint8_t index; /* structure index ==0x00*/
} OTP_BT_t;

3、OTP编程

由于OTP是one-time-programming,所以只能编程一次,编程只能以64bits对齐,指的是在同一款内存区只能编程一次,并不是整个1K大小的区域只编程64bits后下一次就不能编程了。在这个1K大小的区域中,主要以64bits对齐的区域的数据全是FF就能编程。

Even if the configuration phase is not supposed to be repeated, there may be some case where it should be overwritten. When using OTP bytes current configuration cannot be removed, the new one is placed at the next free double-word slot.

技术分享图片

 

STM32WB 信息块之OTP

原文:https://www.cnblogs.com/yeshenmeng/p/10837507.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!