avr-libc
avr-libc copied to clipboard
[bug #50501] eeprom_update_byte() can reduce wear more
Thu 09 Mar 2017 06:04:53 AM CET
If the new value does not contain any 1 bits where the old value contains a 0 bit (ANDing the new value with the old value yields the new value), the cell does not have to be erased and can simply be overwritten with the new value.
This issue was migrated from https://savannah.nongnu.org/bugs/?50501
Eric Tang <e_l_tang> Thu 09 Mar 2017 06:12:53 AM CET
This test should be performed in addition to the current test for equality, not in lieu of it.
Jan Waclawek
I wouldn't recommend to do this unless explicitly allowed by datasheet or an Atmel insider approves it. Depending on the particular implementation of EEPROM, write distrubs may decrease read reliability. This is not something which can be qualified by "I tried and it worked for me".
See also #555