Atmel Xplained Pro Evaluation Kit for the ATSAMD21J18A Microcontroller ATSAMD21-XPRO ATSAMD21-XPRO Data Sheet
Product codes
ATSAMD21-XPRO
347
Atmel | SMART SAM D21 [DATASHEET]
Atmel-42181C–SAM-D21_Datasheet–07/2014
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.
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
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
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 directly,
while other operations such as manual page writes and row erase must be performed by issuing commands through the
NVM Controller.
bus. Read and automatic page write operations are performed by addressing the NVM main address space directly,
while other operations such as manual page writes and row erase must be performed by issuing commands through the
NVM Controller.
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