Skip to content

EEPROM read before write? #1923

Closed
Closed
@EternityForest

Description

@EternityForest

I took a look at the EEPROM code and at avr-libc but I did not find anything that looked like a pre-write value check. I have heard a number of developers prefer to read the eeprom to ensure that it isn't already the value you want to write to it before writing, to save write cycles.

Is the lack of this check intentional to avoid bloat? There isn't very many applications where it would be useful, but there are some cases where it might be useful, as a protection to novice programmers, and in cases where values are mostly the same the speedup would be huge.

It might also come up in the eeprom clear sketch, if someone accidentally left it programmed in, several erase cycles could be wasted for no good reason. Maybe at the very least the eeprom clear sketch should be changed to include a check?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: DuplicateAnother item already exists for this topic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions