B4R Question ESp32 flash size and rEEPROM

rodmcm

Active Member
Licensed User
As will be seen in another thread I have a need to store data in non volatile memory.

I started using rEEPROM on a ESP-Wroom-32 which has a 25Q32CS1G flash. The spec for this says 32MB

I have found that with rEEPROM I cant store or retrieve more than about 1K or data

i assume 1024 byte as per rEEPROM.cpp line 14 and 17.

Changed this to 4096 as an experiment and based on advise from another thread with no change in store and retrieve size that I can see

The searching i've done as ESP Arduino etc sheds almost no light on how much memory in the on board flash is actually available to the user. Some answers say none at all!

Can anyone shed light on this, and if it is greater than 1024 how to access it please
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
This code works properly after I changed the sizes in rEEPOM.cpp to 4096:

B4X:
Sub Process_Globals
   Public Serial1 As Serial
   Dim e As EEPROM
End Sub

Private Sub AppStart
   Serial1.Initialize(115200)
   Log("AppStart")
   e.WriteBytes("abcde", 3500)
   Log(e.ReadBytes(3500, 5))
End Sub

Note that there is an issue with older versions of ESP32 SDK. I solved it by downloading the complete project: https://github.com/espressif/arduino-esp32 and copying the libraries folder to:

C:\users\<user name>\Documents\Arduino\hardware\espressif\esp32\
 
Upvote 0

rodmcm

Active Member
Licensed User
Thanks Erel. I see the same results. Tried pushing 4096 to 8192 but no joy. So 4096 it is
Have found that I can read and write individually to any Eeprom location but if i do a loop read then ESp crashes after about 45 reads... Useless. obviously something in the ESP32.
Methinks that the ESP is a good idea but has too many options and is straining at the edges
 
Upvote 0

positrom2

Active Member
Licensed User
Longtime User
There are also old and new Esp32 (Revisions). There are arduino sketches to read out the Revision. Potentially the new ones behave better than the old ones (nodemcu32 currently ships with new ones).
 
Upvote 0
Top