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

how to write data to UICR?

Hello,

In nRF52832 we use these commands to write data to user information configuration register:

nrfjprog -f nrf52 --memwr 0x10001080 --val 0x00010000

and use memcpy to get the data in C code.

My question is: how do we do it in nRF5340? what is the address we can use to write data? I checked the documents but there is no examples.

Thanks.

Carl

Parents
  • Hi Carl,

    The UICR is just like any other flash memory, so you write it in the exact same way, for instance using nrfjprog like you suggest in your post. The only limitation is that the OTM emulation only allows writing once to each half-word, but that is generally no problem. You can see the available addresses under UICR in the product specification. Note that if you use some SDK modules that may also use some of the UICR OTP registers for other purposes (such as key storage in the immutable bootloader etc.) - if that is the case you should ensure no overlap.

    As you can see from the PS, the UICR OTP registers for the app core starts at 0x00FF8100.

    Einar

Reply
  • Hi Carl,

    The UICR is just like any other flash memory, so you write it in the exact same way, for instance using nrfjprog like you suggest in your post. The only limitation is that the OTM emulation only allows writing once to each half-word, but that is generally no problem. You can see the available addresses under UICR in the product specification. Note that if you use some SDK modules that may also use some of the UICR OTP registers for other purposes (such as key storage in the immutable bootloader etc.) - if that is the case you should ensure no overlap.

    As you can see from the PS, the UICR OTP registers for the app core starts at 0x00FF8100.

    Einar

Children
No Data
Related