Functional Description
548
SLAU723A – October 2017 – Revised October 2018
Copyright © 2017–2018, Texas Instruments Incorporated
Internal Memory
7.2.4.1.10 Error During Programming
Operations such as data-write, password set, protection set, and copy buffer erase can perform multiple
operations. For example, a normal write performs two underlying writes: the control word write and the
data write. If the control word writes but the data fails (for example, due to a voltage drop), the overall
write fails with indication provided in the EEDONE register. Failure and the corrective action is broken
down by the type of operation:
•
If a normal write fails such that the control word is written but the data fails to write, the safe course of
action is to retry the operation once the system is otherwise stable, for example, when the voltage is
stabilized. After the retry, the control word and write data are advanced to the next location.
•
If a password or protection write fails, the safe course of action is to retry the operation once the
system is otherwise stable. In the event that multi-word passwords can be written outside of a
manufacturing or bring-up mode, care must be taken to ensure all words are written in immediate
succession. If not, then partial password unlock would need to be supported to recover.
•
If the word write requires the block to be written to the copy buffer, then it is possible to fail or lose
power during the subsequent operations. A control word mechanism is used to track what step the
EEPROM was in if a failure occurs. If not completed, the EESUPP register indicates the partial
completion.
After a reset and prior to writing any data to the EEPROM, software must read the EESUPP register and
check for the presence of any error condition which can indicate that a write or erase was in progress
when the system was reset due to a voltage drop. If either the PRETRY or ERETRY bits are set, the
peripheral should be reset by setting and then clearing the R0 bit in the EEPROM Software Reset
(SREEPROM) register and waiting for the WORKING bit in the EEDONE register to clear before again
checking the EESUPP register for error indicators. This procedure should allow the EEPROM to recover
from the write or erase error. In very isolated cases, the EESUPP register can continue to register an error
after this operation, in which case the reset should be repeated. After recovery, the application should
rewrite the data which was being programmed when the initial failure occurred.
7.2.4.1.11 Soft Reset Handling
The following soft resets should not be asserted during an EEPROM program or erase operation:
•
Software reset (SYSRESREQ)
•
Software peripheral reset
•
Watchdog reset (if configured as a system reset in the RESBEHAVCTL register)
•
MOSC failure reset
•
BOR reset (if configured as a system reset in the RESBEHAVCTL register)
•
External reset (if configured as a system reset in the RESBEHAVCTL register)
•
Writes to the HSSR register
The WORKING bit of the EEDONE register can be checked before the reset is asserted to see if an
EEPROM program or erase operation is occurring. Soft resets can occur when using a debugger and
should be avoided during an EEPROM operation. A reset such as the Watchdog reset can be mapped to
an external reset using a GPIO, or Hibernate can be entered, if time is not a concern.
7.2.4.1.12 Endurance
Endurance is per meta-block, which is 8 blocks. Endurance is measured in two ways:
1. To the application, it is the number of writes that can be performed.
2. To the microcontroller, it is the number of erases that can be performed on the meta-block.
Because of the second measure, the number of writes depends on how the writes are performed. For
example:
•
One word can be written more than 500000 times, but, these writes affect the meta-block that the word
is within. As a result, writing one word 500000 times, then trying to write a nearby word 500000 times
is not assured to work. To ensure success, the words should be written more in parallel.
•
All words can be written in a sweep with a total of more than 500000 sweeps which updates all words
more than 500000 times.