Datasheet
36
AVR079
8133A-AVR-04/08
Table 9-11. Command format.
Offset Field Size Values
0 Command ID
(1)
1 byte XPRG_ERASE
1 Erase mode
(2)
1 byte
XPRG_ERASE_CHIP,
XPRG_ERASE_APP,
XPRG_ERASE_BOOT,
XPRG_ERASE_EEPROM,
XPRG_ERASE_APP_PAGE,
XPRG_ERASE_BOOT_PAGE,
XPRG_ERASE_EEPROM_PAGE or
XPRG_ERASE_USERSIG
2 Address
(3)
4 bytes Any
Notes: 1. The command identifier
2. XPRG_ERASE_CHIP: Erases the whole chip and clears lockbits
XPRG_ERASE_APP: Erases the application section
XPRG_ERASE_BOOT: Erase the boot section
XPRG_ERASE_EEPROM: Erases the whole EEPROM
XPRG_ERASE_APP_PAGE: Erases one application page
XPRG_ERASE_BOOT_PAGE: Erase one boot page
XPRG_ERASE_EEPROM_PAGE: Erases one EEPROM page
XPRG_ERASE_USERSIG: Erases the user signature
3. For the other modes, the Address parameter must point to a location inside the memory area to be erased. The
address is a TIF space address.
3. The address parameter is ignored if erase mode is XPRG_ERASE_CHIP.
Table 9-12. Answer format.
Offset Field Size Values
0 Command ID
(1)
1 byte XPRG_ERASE
1 Status
(2)
1 byte
Notes: 1. The command identifier.
2. One of the defined error codes.
9.2.5 XPRG_WRITE_MEM
This command handles programming of the different XMega memories: application,
boot and eeprom. Fuses, lockbits and user signatures are also programmed with this
command.