Chip Erase

The following steps should be followed to issue a Chip Erase.
  1. 1.Enter the CHIPERASE KEY by using the KEY instruction. See Table 2 for the CHIPERASE signature.
  2. 2.Optional: Read the Chip Erase bit in the AS Key Status register (CHIPERASE in UPDI.ASI_KEY_STATUS) to see that the KEY is successfully activated.
  3. 3.Write the Reset signature into the UPDI.ASI_RESET_REQ register. This will issue a System Reset.
  4. 4.Write 0x00 to the ASI Reset Request register (UPDI.ASI_RESET_REQ) to clear the System Reset.
  5. 5.Read the Lock Status bit in the ASI System Status register (LOCKSTATUS in UPDI.ASI_SYS_STATUS).
  6. 6.Chip Erase is done when LOCKSTATUS == 0 in UPDI.ASI_SYS_STATUS. If LOCKSTATUS == 1, go to point 5 again.

After a successful Chip Erase, the Lockbits will be cleared, and the UPDI will have full access to the system. Until Lockbits are cleared, the UPDI cannot access the system bus, and only CS-space operations can be performed. See User Row Programming.

CAUTION: During Chip Erase, the BOD is forced ON (ACTIVE=0x1 in BOD.CTRLA), and uses the BOD Level from the BOD Configuration fuse (LVL in BOD.CTRLB = LVL in FUSE.BODCFG). If the supply voltage VDD is below that threshold level, the device is unserviceable until VDD is increased adequately.