I’m writing a routine that will search for a value in EEPROM, and I’d like to size my buffer to the block size used for the physical I/O … assuming that would maximize performance. Does anyone know what size that would be? … and if it changes between hardware generations?
There is no block size to speak of in EEPROM, and it varies dramatically between Gen 2 and Gen 3.
In Gen 2 (Photon, P1, Electron, E Series), there are two sectors of flash memory. These are sector erase NOR flash and individual bytes cannot be erased. There’s a wear-leveling algorithm and essentially the data is a running log of the changes over time. When the sector log is full, the data is swapped to the other sector and the old one erased.
In Gen 3 (Argon, Boron, Xenon), the flash emulation is emulated by a file in the flash file system (LittleFS). That does wear leveling in 512 byte sectors.