11.3.2.3.7 EEPROM Multi-Byte Erase Mode
The EEPROM Multi-Byte Erase (EEMBERn) mode allows erasing several bytes in one operation. When enabling the EEMBERn mode, it is possible to select between erasing 2, 4, 8, 16, or 32 bytes in one operation.
The LSbs of the address are ignored when defining which EEPROM locations are erased. For example, while doing an 8-byte erase, addressing any byte in the 0x18 - 0x1F range will result in erasing the entire range of bytes.
CMD | Bytes Erased | Description(1) |
---|---|---|
EEMBER2 | 2 | Addresses matching ADDR[N:1] are erased. The value in ADDR[0] is ignored. |
EEMBER4 | 4 | Addresses matching ADDR[N:2] are erased. The value in ADDR[1:0] is ignored. |
EEMBER8 | 8 | Addresses matching ADDR[N:3] are erased. The value in ADDR[2:0] is ignored. |
EEMBER16 | 16 | Addresses matching ADDR[N:4] are erased. The value in ADDR[3:0] is ignored. |
EEMBER32 | 32 | Addresses matching ADDR[N:5] are erased. The value in ADDR[4:0] is ignored. |
The CPU can continue executing instructions from the Flash while erasing the EEPROM. If the CPU starts an erase or write operation while the EEPROM is busy, the NVMCTRL module will give a wait on the bus, and the CPU will be halted until finishing the current operation.