OTP memory programming

Although the One Time Programmable (OTP) memory is one time programmable, any bit still in a 1 state can be reprogrammed into a 0 state. To avoid deliberate or accidental modification of the OTP memory data, a protection mechanism is provided.

The following table shows how the protection mechanism controls access to the OTP memory through the register REGION.PROTECT.
Table 1. Protection mechanism
OTP memory access state (REGION.PROTECT) Disabled (0xFFFFFFFF) Enabled (0x50FA50FA) Protected (0x00000000)
CALIB.x No access Read/write access Read-only access
MAC.x No access Read/write access Read-only access
QSPI.x No access Read/write access No access

Devices are shipped with the OTP memory access in the disabled state. The Wi-FiĀ® Radio test sample includes commands for programming the OTP memory. The following steps are required:

  1. Set the protection registers (REGION.PROTECT[0..3]) to 0x50FA50FA to enable read/write access of the remaining OTP memory locations with the Wi-Fi Radio test command wifi_radio_ficr_prog otp_write_params 0x100 0x50FA50FA.
  2. Reboot the device to finish enabling read/write access to the OTP memory.
  3. Update the OTP memory registers described in various steps in Production line operations.
  4. Set the OTP memory to protected state with the Wi-Fi Radio test command wifi_radio_ficr_prog otp_write_params 0x100 0x00000000.
Updates to the OTP memory are no longer possible. If needed, enabling protection can be deferred. Programmed values will take effect even without protection enabled.
Note: Whenever an OTP memory register is updated, the corresponding bit in the register REGION_DEFAULTS must be updated to instruct the firmware to utilize the value programmed into the OTP memory, and not the firmware-based default value. When using the Wi-Fi Radio test sample to program the individual OTP memory locations, setting the appropriate bit in the register REGION_DEFAULTS is done automatically.

Use the Wi-Fi Radio test command wifi_radio_ficr_prog otp_read_params to confirm the state of OTP memory. This reports the value of all OTP memory registers, including the register REGION_DEFAULTS, except for the QSPI encryption keys which cannot be read. Alternatively, use the Wi-Fi Radio test command wifi_radio_ficr_prog otp_get_status to indicate which registers have been programmed without reporting the actual values.