EEPROM maximum size

Thomas1
Posts: 11
Joined: Wed Jan 23, 2019 7:40 pm

EEPROM maximum size

Postby Thomas1 » Wed Feb 06, 2019 5:01 pm

What is the maximum size of EEPROM on ESP32? I can't find the information in the data sheet, and googling shows either 512 or 4096.
Is it possible to increase the amount of flash memory assigned to eeprom?

Thanks.

idahowalker
Posts: 166
Joined: Wed Aug 01, 2018 12:06 pm

Re: EEPROM maximum size

Postby idahowalker » Wed Feb 06, 2019 11:00 pm

ESP32 WROVER IPEX Development Board with 8MB PSRAM WiFi+Bluetooth Low Power Consumption Dual Cores ESP32

https://smile.amazon.com/gp/product/B07 ... UTF8&psc=1

ESP_igrr
Posts: 2067
Joined: Tue Dec 01, 2015 8:37 am

Re: EEPROM maximum size

Postby ESP_igrr » Thu Feb 07, 2019 11:42 am

ESP32 Arduino libraries emulate EEPROM using a sector (4 kilobytes) of flash memory. The total flash memory size is (for most of the mass produced modules) 4MB, although some are produced with 8 or 16 MB. The entire space is split between bootloader, application, OTA data, NVS, SPIFFS, and EEPROM. You can find the exact layout in the following partition table: https://github.com/espressif/arduino-es ... efault.csv. Other files in the same directory provide alternative partition tables. You can read more about partition tables in ESP-IDF programming guide: https://docs.espressif.com/projects/esp ... ables.html.

EEPROM library on the ESP32(and also on ESP8266) allows using at most 1 sector (4kB) of flash. Recently a proposal has been made to allow having larger EEPROM areas, https://github.com/esp8266/Arduino/issu ... -443902463, but this hasn't been implemented by anyone yet.

If you need larger storage space, you might be able to achieve this using SPIFFS filesystem, or by working with flash memory directly via esp_partition APIs.

Thomas1
Posts: 11
Joined: Wed Jan 23, 2019 7:40 pm

Re: EEPROM maximum size

Postby Thomas1 » Fri Feb 08, 2019 3:33 pm

ESP_igrr wrote:
Thu Feb 07, 2019 11:42 am
You can find the exact layout in the following partition table: https://github.com/espressif/arduino-es ... efault.csv. Other files in the same directory provide alternative partition tables. You can read more about partition tables in ESP-IDF programming guide: https://docs.espressif.com/projects/esp ... ables.html.

EEPROM library on the ESP32(and also on ESP8266) allows using at most 1 sector (4kB) of flash.
Thanks. If I understand correctly, the default partition gives 1kb of memory. If we want to use more, we have to modify the table up to 4kb. Anything beyond 4kb will need a modification of the EEPROM library?

How do I choose which partition table to use? Or do I have to rename one of the other files to default.csv? Is it possible to have the partition table file included with the arduino project? Meaning if I modify it on my machine then send the project to the rest of the team, will they each have to remember to make the same modification to partition tables?

Thomas1
Posts: 11
Joined: Wed Jan 23, 2019 7:40 pm

Re: EEPROM maximum size

Postby Thomas1 » Fri Feb 08, 2019 6:01 pm

Looking into this more, I think SPIFFS will be more suitable either way.

Thanks for the help esp_igrr.

Who is online

Users browsing this forum: No registered users and 61 guests