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

Writing data to UICR region and flashing device

I'm trying to accomplish two things:

1. Write 2 values to the UICR (2 arrays actually - a serial number and encryption keys).
2. Flash the device in such a way that the information in UICR is preserved.

My questions:

1. Whats the UICR address range? (Based on the  NRF SDK, the UICR base address is 0x10001000UL). The reason I ask is because I can see in the fstorage example that you can specify the start and end addresses of the flash region to reserve for your purposes. In my case I would like to reserve memory starting from  the UICR address base. What's the recommended address range to use?

2. Using nrfjprog, I can specify which areas of flash to erase and keep UICR, by specifying the start and end address of the regions I want to erase. Would it make sense to simply specify the address range as 00000000 - 000ffffff (this is the entire flash) memory range. If I specify this range, would the programmer wipe everything except UICR data (if i specify the --sectorerase option)? I can see from my current application that it lies in the address range 00000000 - 00012b07.
Any reccommendations on what address range to specify to erase?

For now I'm trying to accomplish this without SoftDevice enabled.


Thanks (I'm a bit new to memory management) :)

Related