Data Sheet
358
Atmel | SMART SAM D21 [DATASHEET]
Atmel-42181G–SAM-D21_Datasheet–09/2015
protected by the lock bit(s) corresponding to this address space and by the BOOTPROT[2:0] fuse. The EEPROM rows 
can be written regardless of the region lock status. The number of rows protected by BOOTPROT and the number of 
rows allocated to EEPROM emulation are given in Table 21-2 and Table 21-3, respectively. 
Figure 21-4. EEPROM Emulation and Boot Loader Allocation
21.6.4 Region Lock Bits
The NVM block is grouped into 16 equally sized regions. The region size is dependent on the flash memory size, and is 
given in the table below. Each region has a dedicated lock bit preventing writing and erasing pages in the region. After 
production, all regions will be unlocked.
Table 21-1. Region Size
To lock or unlock a region, the Lock Region and Unlock Region commands are provided. Writing one of these commands 
will temporarily lock/unlock the region containing the address loaded in the ADDR register. ADDR can be written by 
software, or the automatically loaded value from a write operation can be used. The new setting will stay in effect until the 
next reset, or the setting can be changed again using the lock and unlock commands. The current status of the lock can 
be determined by reading the LOCK register.
To change the default lock/unlock setting for a region, the user configuration section of the auxiliary space must be 
written using the Write Auxiliary Page command. Writing to the auxiliary space will take effect after the next reset. 
Therefore, a boot of the device is needed for changes in the lock/unlock setting to take effect. See “Physical Memory 
Map” on page 29 for calibration and auxiliary space address mapping.
21.6.5 Command and Data Interface
The NVM Controller is addressable from the APB bus, while the NVM main address space is addressable from the AHB 
bus. Read and automatic page write operations are performed by addressing the NVM main address space or the 
NVM Base Address
EEPROM Emulation 
allocation
Program 
allocation
NVM Base Address + NVM size
BOOT 
allocation
NVM Base Address + BOOTPROT size
NVM Base Address + NVM size - EEPROM size
Memory Size [KB] Region Size [KB]
256 16
128 8
64 4
32 2










