Hi,
I'm using ESP32 board with 8mb of flash. I choose this configuration because I wanted to store data in remaining portion of the flash chip. So flash partition I kept is nvs 0x5000 otadata 0x2000 app0 2M app1 2M spiffs 4M.
Here I wanted to store data in permanent memory.
I have main 2 questions in this
i) can i use EEPROM over 4096 bytes? like can i use all spiffs as eeprom (hole 4MB)
ii) how to use the flash in most optimize way and faster to read/write.
Thank you
Ajinkya
ESP32 maximum use of remaining Flash
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32 maximum use of remaining Flash
You are talking about Arduino EEPROM? That is stored in the NVS partition if memory serves, not in SPIFS. Wrt how to use the flash optimally, that really depends on the application you're writing; if there were a general answer you'd find it in the docs.
-
- Posts: 8
- Joined: Tue Sep 15, 2020 4:42 am
Re: ESP32 maximum use of remaining Flash
ok thank you.
I'm using SPIFFS to store data into flash.
but I was just wanted to know weather we can create EEPROM library or any library so we can perform byte by byte operations in it.
Thank you
Ajinkya
I'm using SPIFFS to store data into flash.
but I was just wanted to know weather we can create EEPROM library or any library so we can perform byte by byte operations in it.
Thank you
Ajinkya
-
- Posts: 9766
- Joined: Thu Nov 26, 2015 4:08 am
Re: ESP32 maximum use of remaining Flash
....possibly? But why not just use the existing EEPROM/Preferences library that's based on NVS?
-
- Posts: 8
- Joined: Tue Sep 15, 2020 4:42 am
Re: ESP32 maximum use of remaining Flash
okeyESP_Sprite wrote: ↑Fri Oct 09, 2020 7:38 am....possibly? But why not just use the existing EEPROM/Preferences library that's based on NVS?
I use spiffs for flash storage and eeprom for nvs EEPROM.
Thank you so much.
Re: ESP32 maximum use of remaining Flash
Hi,
Another similar question on the same lines.....
In the WROOM-32E Module with 4MB flash, is it possible for me to use, say 200k or 300k of memory from the 4MB Flash for my data storage ?
My code is quite small and comes in under 2MB.
Alternately, if I use a 8MB Module, then I can have 4MB for code and 4MB for data ?
Is it just partitioning accordingly that I need to take care of or is there something else that needs to be done for this ?
Thanks
Another similar question on the same lines.....
In the WROOM-32E Module with 4MB flash, is it possible for me to use, say 200k or 300k of memory from the 4MB Flash for my data storage ?
My code is quite small and comes in under 2MB.
Alternately, if I use a 8MB Module, then I can have 4MB for code and 4MB for data ?
Is it just partitioning accordingly that I need to take care of or is there something else that needs to be done for this ?
Thanks
-
- Posts: 364
- Joined: Mon Jan 04, 2021 2:06 pm
Re: ESP32 maximum use of remaining Flash
Hi,
You just need to create a custom partition and define the storage portion that you want.
For example, you can use something like this (partitions.csv):
Just be sure that you are not overwriting anything and to set the custom .csv file on the configuration (Partition Table menu).
To dive deeper in this subject, see the reference documents: Partitions
You just need to create a custom partition and define the storage portion that you want.
For example, you can use something like this (partitions.csv):
Code: Select all
# Name, Type, SubType, Offset, Size, Flags
# Note: if you change the phy_init or app partition offset, make sure to change the offset in Kconfig.projbuild
nvs, data, nvs, 0x9000, 0x6000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 0x180000,
storage, data, spiffs, , 2M,
To dive deeper in this subject, see the reference documents: Partitions
Who is online
Users browsing this forum: Bing [Bot] and 90 guests