Partition Manager: nRF54L15 OTP Memory Region Size Mismatch

Board: nRF54L15DK

NCS: v3.1.1

When I build an application for the nRF54L15 processor, the "otp" memory region in the auto generated "partitions.yml" file has a size of 0x4FC:

otp:
  address: 0xffd500
  end_address: 0xffd9fc
  region: otp
  size: 0x4fc

The real size of the OTP section is 0x500 (320 4-byte registers) "nrf54l15_types.h":

/* UICR_OTP: One time programmable memory */
  #define UICR_OTP_MaxCount (320UL)                  /*!< Max size of OTP[320] array.                                          */
  #define UICR_OTP_MaxIndex (319UL)                  /*!< Max index of OTP[320] array.                                         */
  #define UICR_OTP_MinIndex (0UL)                    /*!< Min index of OTP[320] array.                                         */

I tracked this autogenerated memory region to the "ncs/v3.1.1/nrf/cmake/sysbuild/partition_manager.cmake" file on lines 526 to 532:

    if(DEFINED ${image_name}_CONFIG_SOC_NRF54L15_CPUAPP
      OR DEFINED ${image_name}_CONFIG_SOC_NRF54L05_CPUAPP
      OR DEFINED ${image_name}_CONFIG_SOC_NRF54L10_CPUAPP
      )
      set(otp_start_addr "0xffd500")
      set(otp_size 1276)  # 319 * 4
    endif()

Is the last of the OPT registers reserved for something?  Why is there a size discrepancy?

Parents Reply Children
  • I am still a little confused, and want to make sure that I won't run into trouble using the last OTP register (index 319) since the partition manager and the peripheral definition do not align.

    If the Partition Manager is wrong, and the OTP register area is actually 320 registers long (indices 0-319), could the devs be notified so they can adjust the partition_manager.cmake file. The otp area should be 0x500 bytes long.

    If the OTP register area is actually 0x4FC bytes long (register indices 0-318), could the documentation and peripheral definitions be updated to reflect that OTP is only 319 registers long.

Related