. . . near the top of page 2
After a RESET it is then possible to look through the Status Buffer,
finding the last Status Buffer element changed by finding the location where the difference between a buffer element and the next buffer element is bigger than 1.
Appears to me that if you got a reset on the first slot that you would not be able to find the last changed buffer item.
Guess chances of that happening are pretty remote, but has anyone modified the code to take care of this case? Maybe, for the first write operation write to both elements 1 and 2. Then the difference will always be bigger than 1.
Also, in the code:
high_endurance_EEPROM.c there is a statement:
// If self-programming is used in the application, insert code here to wait
// for any self-programming operations to finish before writing to the
I assume, from the datasheet (see below), that I just keep testing SPMEN to see when it clears. Correct?
Why would one want to write to the EEPROM while you are self-programming the device??
• Bit 0 – SPMEN: Store Program Memory Enable
. . . The SPMEN bit will auto-clear upon completion of an SPM instruction, or if no SPM instruction is executed within four clock cycles. During page erase and page write, the SPMEN bit remains high until the operation is completed.