451
8331B–AVR–03/12
Atmel AVR XMEGA AU
33.12.3.7
Erase and Write Page
The erase and write application section page, erase and write boot loader section page, and
erase and write EEPROM page commands are used to erase one page and then write a loaded
flash/EEPROM page buffer into that page in the selected memory space in one atomic
operation.
1.
Load the NVM CMD register with erase and write application section/boot loader sec-
tion/user signature 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.
33.12.3.8
Erase Application/ Boot Loader/ EEPROM Section
The erase application section, erase boot loader section, and erase EEPROM section
commands are used to erase the complete selected section.
1.
Load the NVM CMD register with Erase Application/ Boot/ EEPROM Section 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.9
Application / Boot Section CRC
The application section CRC and boot loader section CRC commands can be used to verify the
content of the selected section after programming.
1.
Load the NVM CMD register with application/ boot loader 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 until the operation is finished. The CRC
checksum will be available in the NVM DATA register.
33.12.3.10
Flash CRC
The flash CRC command can be used to verify the content of the flash program memory after
programming. The command can be executed independently of the lock bit state.
1.
Load the NVM CMD register with flash CRC command.
2.
Set the CMDEX bit in the NVM CTRLA register.
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 again, indicting the PDI bus is enabled.
The BUSY flag in the NVM STATUS register will be set until the operation is finished. The CRC
checksum will be available in the NVM DATA register.
33.12.3.11
Write Fuse/ Lock Bit
The write fuse and write lock bit commands are used to write the fuses and the lock bits to a
more secure setting.
1.
Load the NVM CMD register with the write fuse/ lock bit command.
2.
Write the selected fuse or lock bits by doing a PDI write operation.
The BUSY flag in the NVM STATUS register will be set until the command is finished.
For lock bit write, the lock bit write command can also be used.