7.11 LOCK - Memory Sections Access Protection
The device can be locked, making the memories unreadable using the UPDI. The locking protects the Flash (all Boot Code, Application Code, and Application Data sections), SRAM, and the EEPROM, including the FUSE data, preventing the reading of application data or code using the debugger interface. Regular memory access from within the application is still enabled.
Writing a nonvalid key to the Lock Key (LOCK.KEY) register locks the device.
Memory Section | CPU Access | UPDI Access | ||
---|---|---|---|---|
Read | Write | Read | Write | |
Flash | Yes | Yes | Yes | Yes |
SRAM | Yes | Yes | Yes | Yes |
EEPROM | Yes | Yes | Yes | Yes |
SIGROW | Yes | No | Yes | No |
USERROW | Yes | Yes | Yes | Yes |
BOOTROW(3) | Yes | Yes | Yes | Yes |
FUSES | Yes | No | Yes | Yes |
I/O Memory | Yes | Yes | Yes | Yes |
Memory Section | CPU Access | UPDI Access | ||
---|---|---|---|---|
Read | Write | Read | Write | |
Flash | Yes | Yes | No | No |
SRAM | Yes | Yes | No | No |
EEPROM | Yes | Yes | No | No |
SIGROW | Yes | No | No | No |
USERROW | Yes | Yes | No | Yes(2) |
BOOTROW(3) | Yes | Yes | No | No |
FUSES | Yes | No | No | No |
I/O Memory | Yes | Yes | No | No |
Note:
- Read operations marked No in the tables may appear successful, but the data is invalid. Hence, any attempt of code validation through the UPDI will fail on these memory sections.
- Using the Fuse Write command in the Locked mode can write the USERROW, but it is impossible to read out the current USERROW values.
- The BOOTROW can be read and written only from the BOOT section.
Important: The only way to
unlock a device is a CHIPERASE, which won't erase the USERROW and not retain any
application data.