Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By btidey
#86631 Actually it wasn't strictly wrong.

EEPROM (Electrically eraseable programmable read only memory) is the generic acronym for a whole range of persistent but electrically eraseable memory technologies. Flash is just one of those EEPROM technologies.

Some types of EEPROM are byte reprogrammable and this type is commonly used to provide a small area of alterable memory like in some microcontrollers and some people reserve the name EEPROM for this but that is strictly incorrect. Flash is a technology where erasing is done in blocks which normally allows higher density and faster speed.
User avatar
By sblantipodi
#86634
btidey wrote:Actually it wasn't strictly wrong.

EEPROM (Electrically eraseable programmable read only memory) is the generic acronym for a whole range of persistent but electrically eraseable memory technologies. Flash is just one of those EEPROM technologies.

Some types of EEPROM are byte reprogrammable and this type is commonly used to provide a small area of alterable memory like in some microcontrollers and some people reserve the name EEPROM for this but that is strictly incorrect. Flash is a technology where erasing is done in blocks which normally allows higher density and faster speed.


thanks for the answer I appreciate it but I still not understand if the ESP8266, the lolin d1 mini board with 4MB of memory, have 4MB of EEPROM, 4MB of SPIFFS or if arduino manage both SPIFFS and EEPROM on the same physical memory.
User avatar
By eriksl
#86635 The ESP8266 can address 1 Mbyte of flash at a time (for code). So in theory a flash chip of more than 1 Mbyte (8 Mbit) would be useless. There are two notable points though:

- for data access (one page of 4 Kbyte at a time) there is no limitation, this is, afaik, where SPIFFS come in, you can store an arbitrary amount of data in flash, in an organised way (file system).
- the ESP8266 can "map" four "slots" of 1 Mbyte for code. So your code might be in slot 0 (address 0 Mb), slot 1 (address 1 Mb), slot 2 (address 2 Mb) or slot 3 (address 3 Mb). So you can select out of multiple "images" to run from (may be different versions, may be totally different images, within some limits).

If you have more than 4 Mb flash (which I occasionally see), everything about 4 Mb can only be used for data (e.g. SPIFF or similar).
User avatar
By JurajA
#86639
sblantipodi wrote:
JurajA wrote:
davydnorris wrote:This means that spiffs and eeprom are phisically the same memory on the esp 8266?


physically yes. the use is different. in SPIFFS you have files with names. usually static web page files, data logs, debug log.
the EEPROM library emulates EEPROM so the use is a usual EEPROM use to store small binary data at chosen address of the EEPROM.