Closed
Description
----------------------------- Delete above -----------------------------
Basic Infos
- [X ] This issue complies with the issue POLICY doc.
- [ X] I have read the documentation at readthedocs and the issue is not addressed there.
- I have tested that the issue is present in current master branch (aka latest git).
- [X ] I have searched the issue tracker for a similar issue.
- If there is a stack dump, I have decoded it.
- I have filled out all fields below.
Platform
- Hardware: [wemos d1 r1]
- Core Version: 2.5.1
- Development Env: Arduino IDE
- Operating System: Windows
Settings in IDE
- Module: [Wemos D1 R1|
- Flash Mode: unknown
- Flash Size: [4MB]
- lwip Variant: v2 Lower Memory
- Reset Method: board button
- Flash Frequency: [unknown]
- CPU Frequency: [80Mhz]
- Upload Using: [SERIAL]
- Upload Speed: [921600] (serial upload only)
Problem Description
The eeprom.read functions no longer work on my board with my IDE since 2.5.1
it works if using core 2.5.0.
The following sketch read eeprom (emulated eeprom), then write random data to it. and commit at the end.
The sketch read 0 if compiled with core 2.5.1 and later
the sketch dump correct eeprom value if run with core 2.5.0
Other project using eeprom no longuer work either (in my environment).
MCVE Sketch
#include <EEPROM.h>
int addr = 0;
int readMode = 1;
int writeMode = !readMode;
int eepromLength = 100;
void setup()
{
EEPROM.begin(eepromLength);
Serial.begin(9600);
delay(2000);
Serial.println();
Serial.println();
Serial.printf("Core version : %s\n" , ESP.getCoreVersion().c_str() );
Serial.printf("SDK version : %s\n" , ESP.getSdkVersion() );
Serial.printf("eeprom length : %i\n" , eepromLength );
}
void loop()
{
if (addr % 20 == 0)
{
Serial.println();
Serial.print(addr);
Serial.print(" : ");
delay(250);
}
int val = random(50);
if (!readMode ) EEPROM.write(addr, val);
Serial.print(EEPROM.read(addr));
Serial.print(" ");
addr = addr + 1;
if (addr == eepromLength)
{
Serial.println("");
if (readMode )
Serial.println("starting Writing");
else
{
EEPROM.commit();
Serial.println("EEPROM Commited");
delay(10000);
Serial.println("starting reading");
}
readMode = !readMode;
addr = 0;
}
delay(100);
}
Debug Messages
Core version : 2_5_2
SDK version : 2.2.1(cfd48f3)
eeprom length : 100
0 : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
20 : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
40 : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
60 : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
80 : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
starting Writing
0 : 27 24 19 10 37 12 9 12 42 39 42 0 6 3 16 39 18 42 16 29
20 : 40 40 47 13 30 25 46 16 15 21 23 11 41 25 19 30 41 37 3 27
40 : 46 18 16 35 15 22 15 48 20 23 1 14 19 39 49 6 45 38 4 17
60 : 30 0 48 26 27 31 17 19 30 33 6 5 27 37 21 38 36 5 36 38
80 : 6 20 3 17 37 40 43 21 18 49 41 43 43 23 10 3 40 46 41 44
EEPROM Commited
starting reading
0 : 27 24 19 10 37 12 9 12 42 39 42 0 6 3 16 39 18 42 16 29
20 : 40 40 47 13 30 25 46 16 15 21 23 11 41 25 19 �⸮⸮�⸮5⸮⸮⸮
reboot arduino
Core version : 2_5_2
SDK version : 2.2.1(cfd48f3)
eeprom length : 100
0 : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
20 : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
40 : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
60 : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
recompile using 2.5.0
Core version : 2_5_0
SDK version : 3.0.0-dev(c0f7b44)
eeprom length : 100
0 : 77 69 67 86 0 78 101 116 119 111 114 107 0 0 0 0 0 0 0 0
20 : 0 0 0 0 0 0 0 0 0 0 0 0 97 110 101 119 102 117 99 107
40 : 101 100 107 101 121 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
60 : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
80 : 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 119 108 101 100
starting Writing
0 : 41 9 26 4 45 30 48 30 6 6 34 1 45 6 16 3 12 30 26 20
20 : 37 14 18 9 34 31 36 47 23 27 48 17 2 16 43 34 17 7 49 38
40 : 33 32 11 37 26 26 47 22 20 13 33 49 49 31 47 9 13 9 18 46
60 : 44 8 21 34 23 10 27 48 38 46 46 29 19 34 17 35 39 17 21 36
80 : 39 19 29 26 9 36 37 38 40 30 30 10 46 0 39 3 46 24 41 42
EEPROM Commited
starting reading