7.9 Memory Section Access from CPU and UPDI on Locked Device

The device can be locked so that the memories cannot be read using the UPDI. The locking protects both the Flash (all BOOT, APPCODE, and APPDATA sections), SRAM, and the EEPROM including the FUSE data. This prevents successful reading of application data or code using the debugger interface. Regular memory access from within the application still is enabled.

The device is locked by writing any invalid key to the LOCKBIT bit field in FUSE.LOCKBIT.

Table 7-5. Memory Access in Unlocked Mode (FUSE.LOCKBIT Valid)(1)
Memory SectionCPU AccessUPDI Access
ReadWriteReadWrite
SRAMYesYesYesYes
RegistersYesYesYesYes
Flash YesYesYesYes
EEPROMYesYesYesYes
USERROWYesYesYesYes
SIGROWYesNoYesNo
Other FusesYesNoYesYes
Table 7-6. Memory Access in Locked Mode (FUSE.LOCKBIT Invalid)(1)
Memory SectionCPU AccessUPDI Access
ReadWriteReadWrite
SRAMYesYesNoNo
RegistersYesYesNoNo
Flash YesYesNoNo
EEPROMYesYesNoNo
USERROWYesYesNoYes(2)
SIGROWYesNoNoNo
Other FusesYesNoNoNo
Note:
  1. Read operations marked No in the tables may appear to be successful, but the data is corrupt. Hence, any attempt of code validation through the UPDI will fail on these memory sections.
  2. In Locked mode, the USERROW can be written blindly using the Fuse Write command, but the current USERROW values cannot be read out.
Important: The only way to unlock a device is a CHIPERASE, which will erase all device memories to factory default so that no application data is retained.