10.4.6.2 Sequence for Execution of Self-Programming

Self-programming in this context means the execution of writes (commands) to the Non-Volatile Memory Controller (NVMCTRL). The following steps are required to execute self-programming:
  1. The software enables self-programming by writing the Self-Program Memory (SPM) signature to the CCP register (CPU.CCP).
  2. Within the next four CPU instructions, the software must execute the appropriate command in the NVM Controller.
The configuration change protection re-enables automatically after the CPU executes the write instruction or after four other CPU instructions execute.