Skip to content

Erasing EEPROM taking over 30 seconds #547

Closed
@mayurharge

Description

@mayurharge

I have an EEPROM reset function where I erase EEPROM completely.
the function is something like this.

here EEPROM Size is 1024

{ DBG("erasing EEPROM.");
unsigned long start = millis();
for (unsigned int i = 0; i < EEPROM_SIZE; i++)
{
EEPROM.write(i, 0x00);
IWatchdog.reload();
}
DBG("Time took : ", millis() - start);
DBG("Erased eeprom");
// NVIC_SystemReset();
}

[602487] erasing EEPROM.

[632579] Time took : 30092

[632579] Erased eeprom.

to execute this function it's taking more than 30 seconds.
please look into this.

Metadata

Metadata

Assignees

Labels

question ❓Usually converted as a discussion

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions