450
8331B–AVR–03/12
Atmel AVR XMEGA AU
1.
Load the NVM CMD register with the read NVM command.
2.
Read the selected memory address by executing a PDI read operation.
Dedicated read EEPROM, read fuse, read signature row, and read calibration row commands
are also available for the various memory sections. The algorithm for these commands are the
same as for the read NVM command.
33.12.3.3
Erase Page Buffer
The erase flash page buffer and erase EEPROM page buffer commands are used to erase the
flash and EEPROM page buffers.
1.
Load the NVM CMD register with the erase flash/EEPROM page buffer command.
2.
Set the CMDEX bit in the NVM CTRLA register.
The BUSY flag in the NVM STATUS register will be set until the operation is completed.
33.12.3.4
Load Page Buffer
The load flash page buffer and load EEPROM page buffer commands are used to load one byte
of data into the flash and EEPROM page buffers.
1.
Load the NVM CMD register with the load flash/EEPROM page buffer command.
2.
Write the selected memory address by doing a PDI write operation.
Since the flash page buffer is word accessed and the PDI uses byte addressing, the PDI must
write the flash page buffer in the correct order. For the write operation, the low byte of the word
location must be written before the high byte. The low byte is then written into the temporary reg-
ister. The PDI then writes the high byte of the word location, and the low byte is then written into
the word location page buffer in the same clock cycle.
The PDI interface is automatically halted before the next PDI instruction can be executed.
33.12.3.5
Erase Page
The erase application section page, erase boot loader section page, erase user signature row,
and erase EEPROM page commands are used to erase one page in the selected memory
space.
1.
Load the NVM CMD register with erase application section/boot loader section/user
signature row/EEPROM page command.
2.
Set the CMDEX bit in the NVM CTRLA register.
The BUSY flag in the NVM STATUS register will be set until the operation is finished.
33.12.3.6
Write Page
The write application section page, write boot loader section page, write user signature row, and
write EEPROM page commands are used to write a loaded flash/EEPROM page buffer into the
selected memory space.
1.
Load the NVM CMD register with write application section/boot loader section/user sig-
nature row/EEPROM page command.
2.
Write the selected page by doing a PDI write. The page is written by addressing any
byte location within the page.
The BUSY flag in the NVM STATUS register will be set until the operation is finished.