9.5.1 Control A

Name: CTRLA
Offset: 0x00
Reset: 0x00
Property: Configuration Change Protection

Bit 76543210 
      CMD[2:0] 
Access R/WR/WR/W 
Reset 000 

Bits 2:0 – CMD[2:0] Command

Write this bit field to issue a command. The Configuration Change Protection key for self-programming (SPM) has to be written within four instructions before this write.
ValueNameDescription
0x0-No command
0x1WPWrite page buffer to memory (NVMCTRL.ADDR selects which memory)
0x2ERErase page (NVMCTRL.ADDR selects which memory)
0x3ERWPErase and write page (NVMCTRL.ADDR selects which memory)
0x4PBCPage buffer clear
0x5CHERChip erase: erase Flash and EEPROM (unless EESAVE in FUSE.SYSCFG is '1')
0x6EEEREEPROM Erase
0x7WFUWrite fuse (only accessible through UPDI)