Looking at this forum post from 11 months ago, and I'm confused about the guidance given.
https://devzone.nordicsemi.com/f/nordic-q-a/99083/reading-uicr-value-at-runtime-for-nrf53
- Is it possible to read from the UICR using the build target nRF5340dk_nrf5340_cpuapp (instead of the nRF5340dk_nrf5340_cpuapp_ns build target)
- If so, is there guidance or a sample on how to read from the UICR within the application? I believe it might involve the key-management subsystem?
On the nRF5340, I can use nrfjprog.exe to write our public BLE MAC address to the first six bytes of the "OTP" registers of the UICR, but the application cannot read these registers. No matter what, my application reads 0xdeaddead despite the value being clearly written in the "OTP" registers:
[00000000.546] read_from_uicr() | start=0x00FF8000, offset=0x100 >> reg=0x00FF8100 [00000000.546] read_from_uicr() | AD DE AD DE AD DE AD DE AD DE AD DE AD DE AD DE [00000000.546] read_from_uicr() | AD DE AD DE AD DE AD DE AD DE AD DE AD DE AD DE
Here's the output of nrfjprog.exe that shows those registers are written on my nRF5340 (and definitely not equal to 0xdeaddead):
cal@AF-X-Dev-W002:~$ nrfjprog.exe --snr 1050018178 --memrd 0x00FF8100 --w 16 --n 128 0x00FF8100: 0455 0000 2211 4433 FFFF FFFF FFFF FFFF |U...."3D........| 0x00FF8110: FFFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF |................|