OTP allocation for NSIB

In the documentation for the secure bootloader, it's mentioned that the provisioning data gets stored in OTP memory for some chips (e.g. nRF5340). Is there a way to know what portion or address space of the OTP will be used by the bootloader?

The current project I'm working on, using the nRF5340, requires roughly 40-48B of OTP for manufacturer-specific data. Is there a way to ensure that these datasets will not overlap and corrupt one another? 

Thank you!

Parents
  • Hi,

    There is no region of the OTP that is reserved for customer use, so in principle, there can be changes in future SDK releases that use additional registers that are not currently used. One option is to manage that youself. Another option could be to use the CUSTOMER region in the UICR for the network core. However, then you would need to handle the use of this on the nework core, as this is not directly accessible from the application core.

  • Hi Einar,

    Thank you for your response!

    One option is to manage that youself.

    This option would likely be the most viable for this project - but ignoring the possibility that later SDK changes might use additional registers, with the version I'm using (2.9.0), will the provisioning data for the secure bootloader always be written to the same registers? Or is it possible to choose where the provisioning data will be written?

    Thank you again!

  • Hello,

    After setting up the static partitions for the bootloader, I saw the provision partition that was automatically generated: 

    provision:
      address: 0xff8100
      end_address: 0xff8380
      region: otp
      size: 0x280

    I added it to my static partitions file and shifted it to the end of the partition, then I added a placeholder partition to fill in the gap at the start of the region (which is where the manufacturer-specific data will be stored)

    provision:
      address: 0xff8180
      end_address: 0xff8400
      region: otp
      size: 0x280
      
    factory_data_otp:
      address: 0xff8100
      end_address: 0xff8180
      placement:
        before: provision
      region: otp
      size: 0x80

    But this resulted in the following partition being generated during the build:

    otp:
      address: 0xff8400
      end_address: 0xff83fc
      region: otp
      size: -0x4

    What does this mean? Why would a gap be detected with negative size?

    Also do you know if shifting the provision partition might cause any other issues? Are there other known uses for the OTP region that I may be missing or overlooking? Unfortunately I'm running into some separate build errors that are preventing me from gaining information through testing/experimentation, but I'm hoping I can get some answers on this front.

    Thank you!

Reply
  • Hello,

    After setting up the static partitions for the bootloader, I saw the provision partition that was automatically generated: 

    provision:
      address: 0xff8100
      end_address: 0xff8380
      region: otp
      size: 0x280

    I added it to my static partitions file and shifted it to the end of the partition, then I added a placeholder partition to fill in the gap at the start of the region (which is where the manufacturer-specific data will be stored)

    provision:
      address: 0xff8180
      end_address: 0xff8400
      region: otp
      size: 0x280
      
    factory_data_otp:
      address: 0xff8100
      end_address: 0xff8180
      placement:
        before: provision
      region: otp
      size: 0x80

    But this resulted in the following partition being generated during the build:

    otp:
      address: 0xff8400
      end_address: 0xff83fc
      region: otp
      size: -0x4

    What does this mean? Why would a gap be detected with negative size?

    Also do you know if shifting the provision partition might cause any other issues? Are there other known uses for the OTP region that I may be missing or overlooking? Unfortunately I'm running into some separate build errors that are preventing me from gaining information through testing/experimentation, but I'm hoping I can get some answers on this front.

    Thank you!

Children
No Data
Related