432
8331B–AVR–03/12
Atmel AVR XMEGA AU
The device can be locked to prevent reading and/or writing of the NVM. There are separate lock
bits for external programming access and self-programming access to the boot loader section,
application section, and application table section.
33.3
NVM Controller
Access to the nonvolatile memories is done through the NVM controller. It controls NVM timing
and access privileges, and holds the status of the NVM, and is the common NVM interface for
both external programming and self-programming. For more details, refer to
.
33.4
NVM Commands
The NVM controller has a set of commands used to perform tasks on the NVM. This is done by
writing the selected command to the NVM command register. In addition, data and addresses
must be read/written from/to the NVM data and address registers for memory read/write
operations.
When a selected command is loaded and address and data are set up for the operation, each
command has a trigger that will start the operation. Based on these triggers, there are three
main types of commands.
33.4.1
Action-triggered Commands
Action-triggered commands are triggered when the command execute (CMDEX) bit in the NVM
control register A (CTRLA) is written. Action-triggered commands typically are used for opera-
tions which do not read or write the NVM, such as the CRC check.
33.4.2
NVM Read-triggered Commands
NVM read-triggered commands are triggered when the NVM is read, and this is typically used
for NVM read operations.
33.4.3
NVM Write-triggered Commands
NVM write-triggered commands are triggered when the NVM is written, and this is typically used
for NVM write operations.
33.4.4
Write/Execute Protection
Most command triggers are protected from accidental modification/execution during self-pro-
gramming. This is done using the configuration change protection (CCP) feature, which requires
a special write or execute sequence in order to change a bit or execute an instruction. For
details on the CCP, refer to
”Configuration Change Protection” on page 13
.
33.5
NVM Controller Busy Status
When the NVM controller is busy performing an operation, the busy flag in the NVM status regis-
ter is set and the following registers are blocked for write access:
• NVM command register
• NVM control A register
• NVM control B register
• NVM address registers
• NVM data registers