441
8331B–AVR–03/12
Atmel AVR XMEGA AU
1.
Load the Z-pointer with the flash page to write. The page address must be written to
FPAGE. Other bits in the Z-pointer will be ignored during this operation.
2.
Load the NVM CMD register with the erase and write application section/boot loader
section page command.
3.
Execute the SPM instruction. This requires the timed CCP sequence during self-
programming.
The BUSY flag in the NVM STATUS register will be set until the operation is finished. The
FBUSY flag is set as long as the flash is busy, and the application section cannot be accessed.
An invalid page address in the Z-pointer will abort the NVM command. The erase and write
application section command requires that the Z-pointer addresses the application section, and
the erase and write boot section page command requires that the Z-pointer addresses the boot
loader section.
33.11.2.11
Application Section / Boot Loader Section CRC
The application section CRC and boot loader section CRC commands can be used to verify the
application section and boot loader section content after self-programming.
1.
Load the NVM CMD register with the application section/ boot load section CRC
command.
2.
Set the CMDEX bit in the NVM CTRLA register. This requires the timed CCP sequence
during self-programming.
The BUSY flag in the NVM STATUS register will be set, and the CPU is halted during the execu-
tion of the CRC command. The CRC checksum will be available in the NVM data registers.
33.11.2.12
Erase User Signature Row
The erase user signature row command is used to erase the user signature row.
1.
Load the NVM CMD register with the erase user signature row command.
2.
Execute the SPM instruction. This requires the timed CCP sequence during self-
programming.
The BUSY flag in the NVM STATUS register will be set, and the CPU will be halted until the
erase operation is finished. The user signature row is NRWW.
33.11.2.13
Write User Signature Row
The write signature row command is used to write the flash page buffer into the user signature
row.
1.
Set up the NVM CMD register to write user signature row command.
2.
Execute the SPM instruction. This requires the timed CCP sequence during self-
programming.
The BUSY flag in the NVM STATUS register will be set until the operation is finished, and the
CPU will be halted during the write operation. The flash page buffer will be cleared during the
command execution after the write operation, but the CPU is not halted during this stage.
33.11.2.14
Read User Signature Row / Calibration Row
The read user signature row and read calibration row commands are used to read one byte from
the user signature row or calibration row.