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

Can I erase UICR in ble app?

Can I erase UICR in ble app or must erase all chip and write uicr again?

  • Edited

    Yes, UICR registers can only be erased by ERASEALL.

  • I have the same question. I'm using a mix of rev 2 and rev 3 nRF51822s (XXAA). Using NRF_NVMC->ERASEUICR = 1 doesn't do anything. It's critical that I reset the BOOTLOADERADDR field, the Nordic MBR must not execute my bootloader while I update it if the system is reset accidentally.

  • I received an answer on Nordic's support portal. To erase the UICR, you must erase all flash. Nordic reasons that if the UICR can be erased while running then the readback protection configured in the UICR can be defeated.

  • So can't I use the customer registers? I mean use it to save user data?

  • update: nrf52 has a different memory protection implementation and allows the UICR section to be erased at runtime.