33.3.7.3 User Row Programming

The User Row Programming feature allows the user to program new values to the User Row (USERROW) on a locked device. To program with this functionality enabled, the following sequence should be followed.

  1. Enter the USERROW-Write KEY located in Table 33-6 by using the KEY instruction. See Table 33-6 for the UROWWRITE signature.
  2. Optional: Read the UROWWRITE bit field in UPDI.ASI_KEY_STATUS to see that the KEY has been activated.
  3. Write the Reset signature into the UPDI.ASI_RESET_REQ register. This will issue a System Reset.
  4. Write 0x00 to the Reset signature in the UPDI.ASI_RESET_REQ register to clear the System Reset.
  5. Read the UROWPROG bit in UPDI.ASI_SYS_STATUS.
  6. User Row Programming can start when UROWPROG == 1. If UROWPROG == 0, go to point 5 again.
  7. The writable area has a size of one EEPROM page, 32 bytes, and it is only possible to write User Row data to the first 32 byte addresses of the RAM. Addressing outside this memory range will result in a non-executed write. The data will map 1:1 with the User Row space when the data is copied into the User Row upon completion of the Programming sequence.
  8. When all User Row data has been written to the RAM, write the UROWWRITEFINAL bit in UPDI.ASI_SYS_CTRLA.
  9. Read the UROWPROG bit in UPDI.ASI_SYS_STATUS.
  10. The User Row Programming is completed when UROWPROG == 0. If UROWPROG == 1, go to point 9 again.
  11. Write the UROWWRITE bit in UPDI.ASI_KEY_STATUS.
  12. Write the Reset signature into the UPDI.ASI_RESET_REQ register. This will issue a System Reset.
  13. Write 0x00 to the Reset signature in the UPDI.ASI_RESET_REQ register to clear the System Reset.
  14. User Row Programming is complete.

It is not possible to read back data from the SRAM in this mode. Only writing to the first 32 bytes of the SRAM is allowed.