Hello,
I've been working on a feature lately that involves writing the OTP registers in UICR on nrf54L15; after writing the registers I also wrote the protected value (0x50FA50FA) to the ERASEPROTECT registers and this locked the OTP values in place.
Now I want to revert the development kit the previous state to perform some more testing and I saw that the erase protection can be disabled through the handshake mechanism where both the firmware and the debugger write the same key to the respective ERASEPROTECT.DISABLE register in the CTRL-AP.
I added the following piece of code to my application and reflashed it on the board:
NRF_CTRLAP_S->ERASEPROTECT.DISABLE = 0x12345678;SWDSelectSWDWriteDP 1 0x50000000 // power upSWDWriteDP 2 0x02000000 // select AP2 (CTRL-AP)SWDWriteAP 4 0x12345678 // write erase prot. disable key (register index 4 in AP