I need to save a serial number that is one time configurable. Is there an OTP memory where I can save that number?
I need to save a serial number that is one time configurable. Is there an OTP memory where I can save that number?
Sort of: there is UICR region which can be rewritten (erased) only by erasing whole flash memory content. But if you look for true "only once in the life-time" or "cannot be written more than once" (because UICR can be written several times and if you don't erase it in between it will simply hold the superposition of these two writes) then you are out of luck. Btw. each nRF5x chip has already 8-byte random serial number burned into FICR so you might be redeveloping the wheel;)
In every case read more about UICR and FICR registers in product specification on Infocenter.
You are correct. In the nRF51 series the UICR could only be erased by doing an ERASE ALL, but in the nRF52 series we added the capability to erase the UICR separately. Either internally, or externally by using the nrfjprog command line utility.
We don't have a proper OTP section in the nRF52, but you can use the UICR for this purpose as long as you take care not to erase it.
Best regards
in the nRF52 series we added the capability to erase the UICR separately
ovrebekk is there any support for this in the nRF52 SDK? I can't seem to find any.
Hi Jesper
It seems you are correct, there is no SDK or SoftDevice API for erasing the UICR. You would have to access the register directly.
Please be aware that you can not access the NVMC when the SoftDevice is running. You either have to do it before enabling the SD, or disable it first.
Best regards
Torbjørn
Hi Jesper
It seems you are correct, there is no SDK or SoftDevice API for erasing the UICR. You would have to access the register directly.
Please be aware that you can not access the NVMC when the SoftDevice is running. You either have to do it before enabling the SD, or disable it first.
Best regards
Torbjørn