Writing data with access port protection disabled

nRF54L Series Production Programming

Use the standard Serial Wire Debug (SWD) Arm® CoreSight™ Debug Access Port (DAP) protocol to write data into the non-volatile memory (RRAM).

Different nRF54L Series devices have different base address for the Resistive Random-Access Memory Controller (RRAMC). The following table lists the addresses for the different devices.

Table 1. Register overview
Register name nRF54L05, nRF54L10, nRF54L15 nRF54LM20A, nRF54LM20B, nRF54LV10A nRF54LS05A, nRF54LS05B
RRAMC.TASKS_COMMITWRITEBUF 0x5004B008 0x5004E008 0x4004E008
RRAMC.CONFIG 0x5004B500 0x5004E500 0x4004E500
RRAMC.READY 0x5004B400 0x5004E400 0x4004E400

The RRAM controller has different write buffer sizes. The following table lists the maximum write buffer size, the corresponding data chunk size, and the corresponding RRAMC.CONFIG register value for the configuration.

Table 2. RRAMC.CONFIG register value to enable write and use maximum buffer size
Device Write buffer size in bytes RRAM data unit size in bytes Chunk size in bytes CONFIG register value
nRF54LV10A 16 16 256 0x1001
nRF54L05, nRF54L10, nRF54L15, nRF54LM20A, nRF54LM20B 32 16 512 0x2001
nRF54LS05A, nRF54LS05B 32 8 256 0x2001

Complete the following steps:

  1. To select the maximum write buffer size for write operations, write the appropriate CONFIG register value from RRAMC.CONFIG register value to enable write and use maximum buffer size to the RRAMC.CONFIG register of the RRAMC.
    This enables buffered write to the non-volatile memory.
  2. Read the RRAMC.READY register until the value is 0x1.
    When this value is read, the RRAMC is ready and not performing any operations.
  3. Write the data in chunks to the desired, word-aligned address.
    The chunk size must match the value specified in RRAMC.CONFIG register value to enable write and use maximum buffer size. If the data is not aligned to the chunk size, use the RRAMC.TASKS_COMMITWRITEBUF register to commit the data from the internal write buffer to the non-volatile memory. Write 0x1 to the RRAMC.TASKS_COMMITWRITEBUF register to trigger this task.
  4. When all data is written, read the RRAMC.READY register again until the value is 0x1 to ensure the write operation has completed.
  5. Write 0x0 to the RRAMC.CONFIG register of the RRAMC.
    This configures the non-volatile memory as read-only.

The ranges of writeable addresses are the following: