- Wed Jan 27, 2016 10:42 am
#39826
Having a similar problem when trying to open a file for writing, erasing apparently didn't help. Any ideas on what I might be doing wrong or what else to troubleshoot?
The module:
ESP8266-07
REST - high
CH_PH - high
GPIO15 - low
GPIO0 - high when running, low when flashing
Power supply voltage - sufficient, checked
The code:
1. In setup():
Code: Select all if (persistenceEnabled) {
if (!SPIFFS.begin()) {
persistenceEnabled = 0;
Serial.printf("Failed to open file system\n");
} else {
Serial.printf("File system initialized\n");
}
}
2. In loop():
Code: Select all Serial.printf("Opening %s...\n", SEQ_FILE_NAME);
File seqFile = SPIFFS.open(SEQ_FILE_NAME, "w");
if (seqFile) {
Serial.printf("Writing file %s\n", SEQ_FILE_NAME);
Erase:
1. Power on in flashing mode.
2. ./esptool.py --port /dev/ttyUSB0 --baud 115200 flash_id
Connecting...
Manufacturer: e0
Device: 4014
3. Proves the connectin is working.
4. Power off & on, connect in flashing mode again.
5. ./esptool.py --port /dev/ttyUSB0 --baud 115200 erase_flash
Connecting...
6. There is no confirmation of success, by design:
Code: Select all def flash_erase(self):
# Trick ROM to initialize SFlash
self.flash_begin(0, 0)
# This is hacky: we don't have a custom stub, instead we trick
# the bootloader to jump to the SPIEraseChip() routine and then halt/crash
# when it tries to boot an unconfigured system.
self.mem_begin(0,0,0,0x40100000)
self.mem_finish(0x40004984)
# Yup - there's no good way to detect if we succeeded.
# It it on the other hand unlikely to fail.
Run the code:
Code: Select allFile system initialized
...
Opening /seq.dat...
ets Jan 8 2013,rst cause:4, boot mode:(1,6)
wdt reset