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

which registers cant be erasable in nrf52, which can be possible to Read/Write

hi, i am using NRF52 custom board. i want to provide serial number to each board, which i want to read or write any time using my firmware. if i erase the bord it should not erase the serial number registers is it possible to make it happen. please give me suggestion. Currently, i am using UICR registers to read and write serial number in it. but if i erase chip. these registers also erasing.

Thankyou.

Parents
  • Hi,

    I think UICR is the best alternative for storing serial number. You have a couple of options to leave the serial in UICR when flashing your application:

    1. Use --sectorerase option in combination with --program when flashing, instead of --eraseall. With this option, only the targeted non-volatile memory pages, excluding UICR will be erased.
    2. If you need to erase whole chip, you can read UICR before erasing, and reflash it after application:

    nrfjprog --readuicr uicr.hex

    nrfjprog --eraseall

    nrfjprog --program application.hex

    nrfjprog --program uicr.hex

    Best regards,

    Jørgen

Reply
  • Hi,

    I think UICR is the best alternative for storing serial number. You have a couple of options to leave the serial in UICR when flashing your application:

    1. Use --sectorerase option in combination with --program when flashing, instead of --eraseall. With this option, only the targeted non-volatile memory pages, excluding UICR will be erased.
    2. If you need to erase whole chip, you can read UICR before erasing, and reflash it after application:

    nrfjprog --readuicr uicr.hex

    nrfjprog --eraseall

    nrfjprog --program application.hex

    nrfjprog --program uicr.hex

    Best regards,

    Jørgen

Children
No Data
Related