This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

UICR vs flash storage

From application point of view, when should I use UICR and when should I use Flash storage? I have studied the documentation and the functionality seems very similar. The only difference I can see is that I need to reset the CPU to commit a UICR write.

  • Well, UICR is a machine register and flash storage (nrf_fstorage) is a library. They are pretty different things.

    What is the use case? Do you need to store one value (integer) across resets?

  • The use case is persistent storage of encryption keys. I wonder if I should use UICR of Flash (nrf_fstorage). From what I gather, if APPROTECT is set, then unsecuring the chip will wipe both, so there is really no difference. Or is there?

    Looking at this answer it appears that UICR is simply a 1KB flash page, except that it is treated as a separate region to easy programming.