445
8331B–AVR–03/12
Atmel AVR XMEGA AU
33.11.5.2
Erase EEPROM Page Buffer
The erase EEPROM page buffer command is used to erase the EEPROM page buffer.
1.
Load the NVM CMD register with the erase EEPROM buffer 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.
33.11.5.3
Erase EEPROM Page
The erase EEPROM page command is used to erase one EEPROM page.
1.
Set up the NVM CMD register to the erase EEPROM page command.
2.
Load the NVM ADDR register with the addess of the EEPROM page to erase.
3.
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 page erase commands will only erase the locations that are loaded and tagged in the
EEPROM page buffer.
33.11.5.4
Write EEPROM Page
The write EEPROM page command is used to write all locations loaded in the EEPROM page
buffer into one page in EEPROM. Only the locations that are loaded and tagged in the EEPROM
page buffer will be written.
1.
Load the NVM CMD register with the write EEPROM page command.
2.
Load the NVM ADDR register with the address of the EEPROM page to write.
3.
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.
33.11.5.5
Erase and Write EEPROM Page
The erase and write EEPROM page command is used to first erase an EEPROM page and then
write the EEPROM page buffer into that page in EEPROM in one atomic operation.
1.
Load the NVM CMD register with the erase and write EEPROM page command.
2.
Load the NVM ADDR register with the address of the EEPROM page to write.
3.
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.
33.11.5.6
Erase EEPROM
The erase EEPROM command is used to erase all locations in all EEPROM pages that are
loaded and tagged in the EEPROM page buffer.
1.
Set up the NVM CMD register to the erase EPPROM command.
2.
Set the CMDEX bit in the NVM CTRLA register. This requires the timed CCP sequence
during self-programming.