Performing Page Erase by SPM

To execute page erase, set up the address in the Z-pointer, write “X0000011” to SPMCR and execute SPM within four clock cycles after writing SPMCR. The data in R1 and R0 is ignored. The page address must be written to PCPAGE in the Z-register. Other bits in the Z-pointer will be ignored during this operation.

Note: If an interrupt occurs in the timed sequence the four cycle access cannot be guaranteed. In order to ensure atomic operation disable interrupts before writing to SPMCR.