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

Does bootloader use Customer UICR registers?

I want to use the UICR customer registers to store MAC/serialization information for my devices. It looks like the UICR customer section would be great, and the product spec says they are reserved for user application, but @jldewitt mentioned here that the UICR might be used by the bootloader. Is there any documentation on this? I am using a semi-stock Nordic DFU bootloader, but haven't found any info on possible Customer UICR usage...

Parents
  • Hi Collin & Hung,

    The comment I made in the linked question above was based on some declarations in dfu_init.h in SDK 10.0.0. I haven't checked to see if this is still in SDK12.1.0 which is what I am currently using.

    Code snippet:

        /** The device info offset can be modified to place the device info settings at a different location.
      * If the customer reserved UICR location is used for other application specific data, the offset
      * must be updated to avoid collision with that data.
      */
    /** [DFU UICR DEV offset] */
    #define UICR_CUSTOMER_DEVICE_INFO_OFFSET    0x0                                             /**< Device info offset inside the customer UICR reserved area. Customers may change this value to place the device information in a user-preferred location. */
    /** [DFU UICR DEV offset] */
    
    #define UICR_CUSTOMER_RESERVED_OFFSET       0x80                                            /**< Customer reserved area in the UICR. The area from UICR + 0x80 is reserved for customer usage. */
    #define DFU_DEVICE_INFO_BASE                (NRF_UICR_BASE + \
                                                 UICR_CUSTOMER_RESERVED_OFFSET + \
                                                 UICR_CUSTOMER_DEVICE_INFO_OFFSET)              /**< The device information base address inside of UICR. */
    #define DFU_DEVICE_INFO                     ((dfu_device_info_t *)DFU_DEVICE_INFO_BASE)     /**< The memory mapped structure for device information data. */
    
    #define DFU_DEVICE_TYPE_EMPTY               ((uint16_t)0xFFFF)                              /**< Mask indicating no device type is present in UICR. 0xFFFF is default flash pattern when not written with data. */
    #define DFU_DEVICE_REVISION_EMPTY           ((uint16_t)0xFFFF)                              /**< Mask indicating no device revision is present in UICR. 0xFFFF is default flash pattern when not written with data. */
    #define DFU_SOFTDEVICE_ANY                  ((uint16_t)0xFFFE)                              /**< Mask indicating that any SoftDevice is allowed for updating this application. Allows for easy development. Not to be used in production images. */
    

    Regards, John

  • Thanks for the info! I just switched from 12.1.0 to 13.0.0, and I couldn't find the file dfu_init.h in either folder. I also searched for the text UICR_CUSTOMER_DEVICE_INFO_OFFSET, UICR_CUSTOMER_RESERVED_OFFSET, and DFU_DEVICE_INFO_BASE in all SDK files, and didn't get a match. That seems to imply that the customer UICR are no longer used by Nordic code, which would line up with @hungbui's response.

Reply
  • Thanks for the info! I just switched from 12.1.0 to 13.0.0, and I couldn't find the file dfu_init.h in either folder. I also searched for the text UICR_CUSTOMER_DEVICE_INFO_OFFSET, UICR_CUSTOMER_RESERVED_OFFSET, and DFU_DEVICE_INFO_BASE in all SDK files, and didn't get a match. That seems to imply that the customer UICR are no longer used by Nordic code, which would line up with @hungbui's response.

Children
No Data
Related