Data written to EEPROM gets randomly wiped out (rewritten as 0xff) after reset, wake from sleep, or power off/on
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Necesita aclaración
- Estado de actividad
- Estancado
- Stack tecnológico
- cpp
- Área
- embedded-iot
Línea de trabajo
El payload no menciona archivos fuente ni pruebas. Empieza por convertir el sketch explicativo de EEPROM.begin/read/write/commit en una reproducción probada en el SparkFun ESP8266 Thing Dev con core 3.1.2 y, después, compara el comportamiento entre reinicios, suspensión y ciclos de alimentación con el core anterior. Se considerará completado cuando se identifique una causa reproducible y se verifique que los datos de EEPROM confirmados no sean reemplazados por 0xff.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Basic Infos
- This issue complies with the issue POLICY doc.
- 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).
- 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: ESP8266
- Core Version: 3.1.2
- Development Env: [Arduino IDE|]
- Operating System: [Manjaro Linux]
Settings in IDE
- Module: Sparkfun ESP8266 Thing Dev
- Flash Mode: [qio|dio|other] I don't know
- Flash Size: 512 kB
- lwip Variant: v2 Lower Memory
- Reset Method: I don't know
- Flash Frequency: [40Mhz] I don't know
- CPU Frequency: [80Mhz|160MHz] I don't know
- Upload Using: [SERIAL]
- Upload Speed: [115200] (serial upload only)
Problem Description
My code writes to the (fake?) EEPROM with EEPROM.write() and EEPROM.commit() and reads with EEPROM.read() the data that has been written in previous "sessions".
Sometimes, utterly randomly, after waking up from sleep, when my sketch reads a byte from a given position, instead of the value that it had previously written, it finds a 0xff.
My code had been running for literally years without issues on a dozen identical boards.
Recently I re-compiled and re-uploaded with the last version of the Arduino core on a new unit of the same identical board. I made no changes to the relevant part of the code, but the version compiled with the latest core has this issue.
Note that I'm observing the issue on a brand new chip, so this is not the Flash memory getting damaged by too many write cycles. Also, the old boards that are still running the code that was compiled with the old core, are still having no issue (they haven't got anywhere near 10k write cycles).
MCVE Sketch
NOTE: I cannot share the original sketch. I haven't written and tested a minimal sketch. The issue is hard to reproduce at will because it occurs randomly, but it happens often. I'm writing a minimal code example just to explain the issue, but I have not run and tested the code below; consider it as explanatory pseudo-code, it may very well contain mistakes.
#include <Arduino.h>
void setup() {
EEPROM.begin(512);
char x = EEPROM.read(0);
if (x != 'X') Serial.printf("!!! Unexpected value found in EEPROM: %d\n", x);
else Serial.println("Found expected value in EEPROM");
EEPROM.write(0, 'X');
EEPROM.commit();
}
void loop() {
}
Debug Messages
Debug messages go here
- Lenguaje dominante
- C++
- Estrellas
- 16.7k
- Forks
- 13.1k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de esp8266/Arduino
-
Typo in Scan Class DocumentationPosiblemente ocupada @MukundaKatta la tomó hace 181 días. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
-
lwip2 time-wait.patch: TCP_TW_LIMIT can abort the pcb that tcp_process() is still handling -> double free, heap corruptionPosiblemente ocupada @scardus la tomó hace 15 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 52/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 65/100
-
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
Todos los issues de esp8266/Arduino
Issues similares
-
bug format I/O medium priority rt_lib
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
compiler-explorer/compiler-explorer#9272 ·
Los mantenedores suelen responder en 1 día
-
【问题】在文件树重命名文件,发现无法用鼠标选中一段文字Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 76/100
Los mantenedores suelen responder en 1 día