449
8331B–AVR–03/12
Atmel AVR XMEGA AU
Notes:
1. If the EESAVE fuse is programmed, the EEPROM is preserved during chip erase.
33.12.3.1
Chip Erase
The chip erase command is used to erase the flash program memory, EEPROM and lock bits.
Erasing of the EEPROM depends on EESAVE fuse setting. Refer to
for details. The user signature row, calibration row, and fuses are not affected.
1.
Load the NVM CMD register with the chip erase command.
2.
Set the CMDEX bit in the NVM CTRLA register. This requires the timed CCP sequence
during self-programming.
Once this operation starts, the PDI bus between the PDI controller and the NVM is disabled, and
the NVMEN bit in the PDI STATUS register is cleared until the operation is finished. Poll the
NVMEN bit until this is set, indicating that the PDI bus is enabled.
The BUSY flag in the NVM STATUS register will be set until the operation is finished.
33.12.3.2
Read NVM
The read NVM command is used to read the flash, EEPROM, fuses, and signature and calibra-
tion row sections.
0x38
Application section CRC
CMDEX
Y
Y
Boot Loader Section
0x68
Erase boot section
PDI write
N
Y
0x2A
Erase boot loader section page
PDI write
N
Y
0x2C
Write boot loader section page
PDI write
N
Y
0x2D
Erase and write boot loader section page
PDI write
N
Y
0x39
Boot loader section CRC
NVMAA
Y
Y
Calibration and User Signature Sections
0x01
Read user signature row
PDI read
N
N
0x18
Erase user signature row
PDI write
N
Y
0x1A
Write user signature row
PDI write
N
Y
0x02
Read calibration row
PDI read
N
N
Fuses and Lock Bits
0x07
Read fuse
PDI read
N
N
0x4C
Write fuse
PDI write
N
Y
0x08
Write lock bits
CMDEX
Y
Y
EEPROM Page Buffer
0x33
Load EEPROM page buffer
PDI write
N
N
0x36
Erase EEPROM page buffer
CMDEX
Y
Y
EEPROM
0x30
Erase EEPROM
CMDEX
Y
Y
0x32
Erase EEPROM page
PDI write
N
Y
0x34
Write EEPROM page
PDI write
N
Y
0x35
Erase and write EEPROM page
PDI write
N
Y
0x06
Read EEPROM
PDI read
N
N
CMD[6:0]
Commands / Operation
Trigger
Change
Protected
NVM Busy