OTP

概述

OTP 模块提供特定数据保存功能,用于保存掉电后保存的数据。

OTP 模块包含片载 OTP 和 efuse 部分等特殊存储区域,此区域具有单次读写或者锁死功能,调试场景需谨慎操作。

资源依赖

  • Flash otp

用法流程

  • 读写 ppm wq_otp_read_ppm() wq_otp_write_ppm()

  • 读写 mac wq_otp_read_mac() wq_otp_write_mac()

API 介绍

Functions

uint8_t wq_otp_cus_read_data(void *data, uint32_t len, uint32_t offset)

Read cus data to otp region.

参数:
  • data -- the addr of data be read to

  • len -- len of data

  • offset -- offset of cus data

返回:

WQ_RET Send state::WQ_RET

uint8_t wq_otp_cus_write_data(const void *data, uint32_t len, uint32_t offset)
参数:
  • data -- the addr of data write to otp

  • len -- len of data

  • offset -- offset of cus data

返回:

WQ_RET Send state::WQ_RET