389
XMEGA B [DATASHEET]
8291B–AVR–01/2013
30.11.5.1 Load EEPROM Page Buffer
The load EEPROM page buffer command is used to load one byte into the EEPROM page buffer.
1.
Load the NVM CMD register with the load EEPROM page buffer command.
2.
Load the NVM ADDR0 register with the address to write.
3.
Load the NVM DATA0 register with the data to write. This will trigger the command.
Repeat steps 2-3 until the arbitrary number of bytes are loaded into the page buffer.
30.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.
30.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.
30.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.
30.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.
EEPROM
0x32
ERASE_EEPROM_PAGE
Erase EEPROM page
CMDEX
N
Y
Y
ADDR
-
0x34
WRITE_EEPROM_PAGE
Write EEPROM page
CMDEX
N
Y
Y
ADDR
-
0x35
ERASE_WRITE_EEPROM_PAGE
Erase and write EEPROM page
CMDEX
N
Y
Y
ADDR
-
0x30
ERASE_EEPROM
Erase EEPROM
CMDEX
N
Y
Y
-
-
0x06
READ_EEPROM
Read EEPROM
CMDEX
N
Y
N
ADDR
DATA0
CMD[6:0]
Group Configuration
Description
Trigger
CPU
Halted
Change
Protected
NVM
Busy
Address
Pointer
Data
Register
Содержание XMEGA B
Страница 320: ...320 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 12 7 segments Character Table...
Страница 321: ...321 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 13 14 segments Character Table...
Страница 322: ...322 XMEGA B DATASHEET 8291B AVR 01 2013 Table 25 14 16 segments Character Table...
Страница 412: ...412 XMEGA B DATASHEET 8291B AVR 01 2013...
Страница 413: ...413 XMEGA B DATASHEET 8291B AVR 01 2013...
Страница 414: ...414 XMEGA B DATASHEET 8291B AVR 01 2013...