B4R Question ESp32 flash size and rEEPROM

Discussion in 'B4R Questions' started by rodmcm, Nov 22, 2018.

  1. rodmcm

    rodmcm 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
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    This code works properly after I changed the sizes in rEEPOM.cpp to 4096:

    Code:
    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(35005))
    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\
     
  3. rodmcm

    rodmcm 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
     
  4. positrom2

    positrom2 Active Member Licensed 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).
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice