32.8.3 Chip Erase
The Chip Erase will erase the Flash, the SRAM and the EEPROM memories plus Lock bits. The Lock bits are not reset until the program memory has been completely erased. The Fuse bits are not changed. A Chip Erase must be performed before the Flash and/or EEPROM are reprogrammed.
Note: The EEPROM memory is preserved during
Chip Erase if the EESAVE Fuse is programmed.
Load Command “Chip Erase”:
- Set XA1, XA0 to “10”. This enables command loading.
- Set BS1 to “0”.
- Set DATA to “1000 0000”. This is the command for Chip Erase.
- Give XTAL1 a positive pulse. This loads the command.
- Give WR a negative pulse. This starts the Chip Erase. RDY/BSY goes low.
- Wait until RDY/BSY goes high before loading a new command.