Best place to store a factory-programmed HW revision on nRF9160?

I need to store a hardware-revision value on an nRF9160 during manufacturing (using something like nrfjprog), and the non-secure application firmware must be able to read this value at runtime to decide logic.

I’m looking for guidance on which nRF9160 memory area is recommended for this purpose.

Requirements:

  • Written once at factory (e.g., HW_REV = 1,2,3…).

  • Application (non-secure) must be able to read it.

  • Application must not be able to overwrite it accidentally.

Questions:

  1. What is the best location on nRF9160 to store a small factory-programmed value—UICR OTP, KMU, internal flash region, or external flash?

  2. If UICR OTP is used, what is the proper way for non-secure firmware to read it?

  3. What is the recommended tool/command for factory programming (e.g., nrfjprog --memwr, J-Link script, etc.)?

Looking for best practices for storing hardware revision or board identification on nRF9160.

Parents Reply
  • UICR -> OTP works , I can use "nrfjprog --memwr 0x00FF8300 --val 0x00010007" and once written i am unable to change, thats the behaviour that we need .

    But main problem is i am unable to read from my non-secure application code , I get BUS-Fault when i try to read this memory, I need a way to read it from my application code . I am using nrf9160 board with NCS 2.7.0 .

    is there any limitation that UICR can be accessed from only secure application ? My application is non-secure and i just need to read UICR.

Children
Related