avr-libc icon indicating copy to clipboard operation
avr-libc copied to clipboard

[bug #50501] eeprom_update_byte() can reduce wear more

Open avrs-admin opened this issue 3 years ago • 3 comments

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

avrs-admin avatar Jan 31 '22 02:01 avrs-admin

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.

avrs-admin avatar Jan 31 '22 02:01 avrs-admin

Jan Waclawek Thu 09 Mar 2017 09:12:19 AM CET

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".

avrs-admin avatar Jan 31 '22 02:01 avrs-admin

See also #555

sprintersb avatar Mar 18 '24 15:03 sprintersb