Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Preserve device unique information

Hi Nordic.

I have questions about preserving device unique information such as device id and so on.
(The information will be written in factory)

I know the best way is UICR. But UICR size is not enough in my situation.
I want to 250 byte data in flash.
I've checked the memory map document at infocenter, But not sure which memory area is suitable.

infocenter.nordicsemi.com/index.jsp

I want your advice which memory are is best, and how to write (use nrfjprgo command or create HEX and mergehex ??)

I use nRF52832 + S132(v5.1.0) + SDK 14.2.0.

Thanks

Parents
  • Hi,

    There are two different answers for systems with and without a bootloader:

    Without a bootloader, you should store these data in the last flash page on the device towards the top of the device flash area. Typically 0x7F000. If you are using the MBR settings, make sure that the MBR settings page is not set to the same value. From the MBR documentation: "When the UICR.NRFFW[1] register is set, the page it refers to must not be used by the application."

    With a bootloader, you should store these data in a flash page in the "Application data" area in a region before the FDS pages. The default in the bootloader project is that the "Application data" area is 3 pages determined by the define DFU_APP_DATA_RESERVED. The default in most of the SDK applications using peer_manager is that the FDS uses 3 virtual pages with a page size equal to 1 physical page determined by the define FDS_VIRTUAL_PAGES. If you set the size of the "Application data" area to 1 page larger than the FDS area this additional page can be safely used to store data. It will never be written to by the bootloader because it's in the "Application data" area, and it will never be written to the by the FDS because it's outside the FDS area. I have added an annotated flash map below showing where this page will be:

    Best regards,
    Rune Holmgren

  • Hi, thank you for your reply.

    I understand that I need to use "Application data" area because I use bootloader.
    But I have one more question.
    Is "Application data" area safe in case of DFU ?

Reply Children
Related