34.3.7.1 Chip Erase
The following steps should be followed to issue a Chip Erase.
- Enter the CHIPERASE KEY by using
the
KEY
instruction. See Table 34-6 for the CHIPERASE signature. - 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.
- Write the Reset signature into the UPDI.ASI_RESET_REQ register. This will issue a System Reset.
- Write 0x00 to the ASI Reset Request register (UPDI.ASI_RESET_REQ) to clear the System Reset.
- Read the Lock Status bit in the ASI System Status register (LOCKSTATUS in UPDI.ASI_SYS_STATUS).
- 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.
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.