394
XMEGA B [DATASHEET]
8291B–AVR–01/2013
30.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.
30.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 register. 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.
30.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.
30.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 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.
30.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 section/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.
30.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.
Summary of Contents for XMEGA B
Page 320: ...320 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 12 7 segments Character Table...
Page 321: ...321 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 13 14 segments Character Table...
Page 322: ...322 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 14 16 segments Character Table...
Page 412: ...412 XMEGA B DATASHEET 8291B AVR 01 2013...
Page 413: ...413 XMEGA B DATASHEET 8291B AVR 01 2013...