34.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.
- Enter the USERROW-Write KEY located
in Table 34-6 by using the
KEY
instruction. See Table 34-6 for the UROWWRITE signature. - Optional: Read the UROWWRITE bit field in UPDI.ASI_KEY_STATUS to see that the KEY has been activated.
- Write the Reset signature into the UPDI.ASI_RESET_REQ register. This will issue a System Reset.
- Write 0x00 to the Reset signature in the UPDI.ASI_RESET_REQ register to clear the System Reset.
- Read the UROWPROG bit in UPDI.ASI_SYS_STATUS.
- User Row Programming can start when UROWPROG == 1. If UROWPROG == 0, go to point 5 again.
- 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.
- When all User Row data has been written to the RAM, write the UROWWRITEFINAL bit in UPDI.ASI_SYS_CTRLA.
- Read the UROWPROG bit in UPDI.ASI_SYS_STATUS.
- The User Row Programming is completed when UROWPROG == 0. If UROWPROG == 1, go to point 9 again.
- Write the UROWWRITE bit in UPDI.ASI_KEY_STATUS.
- Write the Reset signature into the UPDI.ASI_RESET_REQ register. This will issue a System Reset.
- Write 0x00 to the Reset signature in the UPDI.ASI_RESET_REQ register to clear the System Reset.
- 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.