10.3.2.4 Commands
Reading of the Flash/EEPROM and writing of the page buffer is handled with normal load/store instructions. Other operations, such as writing and erasing the memory arrays, are handled by commands in the NVM.
To execute a command in the NVM:
- Confirm that any previous operation is completed by reading the Busy Flags (EEBUSY and FBUSY) in the NVMCTRL.STATUS register.
- Write the NVM command unlock to the Configuration Change Protection register in the CPU (CPU.CCP).
- Write the desired command value to the CMD bits in the Control A register (NVMCTRL.CTRLA) within the next four instructions.