Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flash read err, 1000 (IDFGH-807) #113

Closed
krzychb opened this issue Nov 20, 2016 · 68 comments
Closed

flash read err, 1000 (IDFGH-807) #113

krzychb opened this issue Nov 20, 2016 · 68 comments

Comments

@krzychb
Copy link
Collaborator

krzychb commented Nov 20, 2016

Hi,

I see the above message on average 5 out of 6 times when resetting ESP32 DevKitJ board
The whole log with this message looks like below (02_blink example loaded):

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x16 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
Falling back to built-in command interpreter.
OK
>ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x16 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3ffc0008,len:0
load:0x3ffc0008,len:1964
load:0x40078000,len:3648
ho 0 tail 12 room 4
load:0x40080000,len:256
entry 0x40080034
I (305) heap_alloc_caps: Initializing heap allocator:
I (306) heap_alloc_caps: Region 19: 3FFB1B9C len 0002E464 tag 0
I (307) heap_alloc_caps: Region 25: 3FFE8000 len 00018000 tag 1
I (317) cpu_start: Pro cpu up.
I (323) cpu_start: Single core mode
I (329) cpu_start: Pro cpu start user code
rtc v118 Oct 19 2016 15:22:11
XTAL 40M
I (368) cpu_start: Starting scheduler on PRO CPU.

The log without message looks as follows:

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x16 (SPI_FAST_FLASH_BOOT)
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x16 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3ffc0008,len:0
load:0x3ffc0008,len:1964
load:0x40078000,len:3648
ho 0 tail 12 room 4
load:0x40080000,len:256
entry 0x40080034
I (305) heap_alloc_caps: Initializing heap allocator:
I (306) heap_alloc_caps: Region 19: 3FFB1B9C len 0002E464 tag 0
I (307) heap_alloc_caps: Region 25: 3FFE8000 len 00018000 tag 1
I (317) cpu_start: Pro cpu up.
I (323) cpu_start: Single core mode
I (329) cpu_start: Pro cpu start user code
rtc v118 Oct 19 2016 15:22:11
XTAL 40M
I (368) cpu_start: Starting scheduler on PRO CPU.

Observations:

  1. Massage flash read err, 1000 shows up as well when I erase_flash using esptool.py.
  2. There seem to be no issues with esp-idf examples running on this board (except the message on start up)
  3. Message show up for all examples I tried
  4. I do not see this message on two other boards I have; ESP32 Demo Board V2 and Core Board V2 (aka DevKitC)

Do you think I can troubleshoot something about it?

@projectgus
Copy link
Contributor

I don't get this on my DevKitJ.

The "flash read err" probably implies the ROM bootloader can't read the bootloader header at 0x1000.

Is it possible the MTDI pin is being pulled down somehow? This will cause the flash voltage regulator to start up with 1.8V output, and maybe it's browning out as a result? As MTDI is configured by the FTDI chip, it may have something to do with the FTDI driver in use.

You can disable the MTDI pin via efuse and force the flash voltage to 3.3V via efuse. There isn't a tool for this yet, but I'm working on it.

@krzychb
Copy link
Collaborator Author

krzychb commented Nov 22, 2016

Hi @projectgus,

Thank you for support with this issue.

This is intermittent error. It shows up on some reboots and on some not. I believe I observed the same on Windows 7 as well as on Ubuntu 16.04 machine

I will follow your MTDI lead and give it a closer look.

Krzysztof

@krzychb
Copy link
Collaborator Author

krzychb commented Nov 23, 2016

I have checked MTDI / GPIO12 and do not see it pulled down.

If I pull it up, then I see module permanently "Falling back to built-in command interpreter" like below:

>ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
Falling back to built-in command interpreter.
OK
>ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
Falling back to built-in command interpreter.
OK
>ets Jun  8 2016 00:22:57

My original issue is instantaneous ""Falling back to built-in command interpreter".
After that application resumes and seems to operate normally until another restart when situation repeats.

When testing 06_sntp I have noticed similar issue on another board.
Now I think this is f/w issue rather than failed h/w.
I will enter separate issue report on that as it deals with 06_sntp example itself.

@projectgus
Copy link
Contributor

@krzychb @igrr was this error narrowed down to being a problem with some DevKitJ hardware?

@igrr
Copy link
Member

igrr commented Dec 22, 2016

I haven't been able to reproduce this (as in, after power on reset). I was able to reproduce similar issue after deep sleep reset — it was caused by the fact that read from flash memory was attempted before the flash chip was ready. Flash chip datasheet mentioned at least 1000us delay after power on, we had around 900us of delay. For deep sleep reset, I have added a menuconfig option to delay wakeup, but i don't think we can do anything equivalent for power-on reset.

It is possible that the same thing happens on normal power on reset sometimes. If @krzychb 's board has particular flash chip which needs slightly longer than average to initialize, this can also explain this error. Now, for the first chip revision this error doesn't make any difference — this chip will undergo WDT reset anyway, on the first startup. But this can be a problem for the next chip revision. We may have to select a flash part with shorter initialization time, to be compatible with the delay which exists in the ROM code.

I think this issue can be closed because it isn't an ESP-IDF issue (this happens before the application is loaded), it is something we need to consider when finalizing BOM for new ESP-WROOM modules.

@igrr igrr closed this as completed Dec 22, 2016
@rmahajan95
Copy link

I am getting the following continuously on the serial monitor after successfully flashing with the ESP-IDF

ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
Falling back to built-in command interpreter.
OK

ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
Falling back to built-in command interpreter.
OK
............................................ and goes on.

I am not able to understand and rectify it. A little help would be appreciated.
Thanks in advance.

@benjaminaigner
Copy link

benjaminaigner commented May 2, 2017 via email

@rmahajan95
Copy link

Thanks, @benjaminaigner.
I tried disabling the flash encryption settings and still facing the same issue.
I even tried doing a fresh installation of the toolchain but that too didn't work out :(

I confirmed by reading the addresses through mongoose that the flash is not encrypted yet and I can see the data in plain text.

Any other possibilities you could think of? I am even attaching the screenshot.
capture

Thanks.

@benjaminaigner
Copy link

Please provide the output from following command:
espefuse.py --port /dev/ttyUSB0 summary
(replace ttyUSB0 if you use a different port)

@rmahajan95
Copy link

Timed out waiting for the packet header.

capture3

@benjaminaigner
Copy link

benjaminaigner commented May 2, 2017 via email

@rmahajan95
Copy link

COM port seems to be correct because I can flash code successfully. I tried powering it externally and check the serial value through Rx-tx and got the same error. Seems to be a hardware issue.

Anyway, thanks for your Help. I'll bring it up if I find the solution. :)

@benjaminaigner
Copy link

benjaminaigner commented May 2, 2017 via email

@dmody
Copy link

dmody commented May 19, 2017

I seem to have this problem also. I find it only happens when I'm trying to use wifi. If I remove the code for connecting to wifi, the error does not occur.

Here's the error message I get:
image

@projectgus
Copy link
Contributor

@dmody in your case, the code is proceeding past the "flash error" and booting, then printing "hello world", but then it seems to be crashing ("Guru Meditation Error") in some later part of your app. The PC (execution) address is garbage (0xffffffff), so something goes very wrong there after "hello world".

This is probably an issue with your app's code rather than anything else mentioned in this Issue thread.

@projectgus
Copy link
Contributor

@rmahajan95 sorry noone got back to you earlier. The code esptool.py uses to connect to the ESP32 for flashing is the same code than espefuse.py uses to connect to the ESP32 to read the efuses, so I'm not sure what the difference is there - something with the hardware setup may be making connection flaky?

@dmody
Copy link

dmody commented May 21, 2017

@projectgus Thanks for replying. I get what I think is the same error when the code is one of the example library (i.e. SimpleWiFitServer). See below for error while running that code.

I built the board I'm using by soldering the module (WROOM-32) to a SEEED studio breakout board. I'm powering it with a lab power supply, so I'm sure I have enough power. The FTDI I'm using is only connected to the TXD0 and RXD0 and ground pins. I don't have DTR and RTS connected to IO13 or IO15. Thus I'm not doing anything with the MTDI, it's floating. I tried connecting GPIO12 (MTDI) to Gnd and get the same error. When I connect it to high, I get the repeating error mentioned above by @rmahajan95 .

Is it possible I damaged something in the module when soldering it to the breakout board? How would I check?

Code:
`#include <WiFi.h>

const char* ssid = "{deleted}";
const char* password = "{deleted}";

WiFiServer server(80);

void setup()
{
Serial.begin(115200);
pinMode(2, OUTPUT); // set the LED pin mode

delay(10);

// We start by connecting to a WiFi network

Serial.println();
Serial.println();
Serial.print("Connecting to ");
Serial.println(ssid);

WiFi.begin(ssid, password);

while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
}

Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());

server.begin();

}
`

output from serial monitor

ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
Falling back to built-in command interpreter.
OK

ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0x00
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0008,len:8
load:0x3fff0010,len:2036
load:0x40078000,len:9988
load:0x40080000,len:252
entry 0x40080034

Connecting to default
Guru Meditation Error of type InstrFetchProhibited occurred on core 0. Exception was unhandled.
Register dump:
PC : 0xffffff0f PS : 0x00060930 A0 : 0x8008c716 A1 : 0x3ffcf030
A2 : 0x3f400a40 A3 : 0x3ffc72f6 A4 : 0x000000f2 A5 : 0xffffffe8
A6 : 0xfffffff0 A7 : 0x3ffc25a0 A8 : 0xffffff0f A9 : 0x3ffcf040
A10 : 0x00000000 A11 : 0x00000002 A12 : 0x5fff0007 A13 : 0x00000000
A14 : 0x00000000 A15 : 0x00000000 SAR : 0x00000006 EXCCAUSE: 0x00000014
EXCVADDR: 0xffffff0c LBEG : 0x4000c2e0 LEND : 0x4000c2f6 LCOUNT : 0x00000000

Backtrace: 0x7fffff0f:0x3ffcf030 0x4008c716:0x3ffcf050 0x400896a1:0x3ffcf090 0x4008a615:0x3ffcf0c0 0x4008ade3:0x3ffcf0e0 0x4011136c:0x3ffcf100 0x401114d5:0x3ffcf120 0x400f3983:0x3ffcf140 0x400f39c1:0x3ffcf170 0x400f3f62:0x3ffcf1a0 0x40094746:0x3ffcf1c0

CPU halted

@projectgus
Copy link
Contributor

Given the point where it crashes, this feels like a power issue still. Using bare modules requires placing a high value low ESR capacitor near the power pins of the module. Without this, the surge of power when WiFi is initialised will probably cause a momentary voltage drop and brownout.

@rmahajan95
Copy link

Hi @dmody ,

I was facing a similar issue with another ESP32 while powering only the ESP32 externally but it somehow worked when I connected the external 3.3v common to both ESP32 and USB to serial converter. (I tried it at my own risk but it worked :P)

You might also try erasing the flash completely using the following command after going to the location where your esptool.py exists.

python esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 115200 --before default_reset --after hard_reset erase_flash

The problem which I earlier mentioned was mostly a hardware issue and I had to desolder the ESP32 from the breakout board and replace it with a new one. It is working for me on the same board with the same power supply.

Let us know if anything works out for you.

@dmody
Copy link

dmody commented May 22, 2017

@rmahajan95 Thanks for getting back to me. I think I've tracked the problem down, but I'm not sure exactly why it's occurring. I'm putting my solution here in case there's someone else having this problem.

The problem was occurring when I had the module in a breadboard and being powered by a 3.3V regulator, or my lab power supply. I found the voltage on the 3.3 V input pin was dropping below 3V (as low as 2.7V), when I connected the Enable pin to the 3.3V pin. Somehow the EN pin was pulling the voltages down, and that's what I don't understand. I had a 10K resistor from the Enable pin to the 3.3V supply, but it still pulled it down.

I did not have this same problem when I moved the circuit to a perf board, and that's what really had me puzzled. The voltage on the Vin pin on the perf board design is about 3.2 Volts

I thought maybe I had some wires on the breadboard that had high resistance, but I can't seem to find anything. I then eliminated some wires and am powering the 3.3V pin from the voltage regulator with only a single wire. That's brought the 3.3V pin up to about 3.1 Volts and the board is running. So clearly the problem is voltage losses, I just can't seem to identify why.

I hope this is helpful to someone out there suffering the same problem.

@projectgus
Copy link
Contributor

It sounds like it may have been the current consumption of the ESP32 itself that was pulling the voltage down. When EN is pulled low, the ESP32 is disabled so it doesn't draw any significant current. Pulling it high turns it on.

Breadboards themselves (especially cheap ones) can have quite high resistance internally inside the breadboard's own connections. Running the power input to the ESP32 across a breadboard connection may cause a significant voltage drop (you can measure by comparing the voltage on each side of the breadboard link.)

@kanalizator
Copy link

kanalizator commented Nov 30, 2017

I know it is an old topic, bud the solution is simple. If you are getting:

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
Falling back to built-in command interpreter.
OK
>ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
Falling back to built-in command interpreter.
OK
>ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
Falling back to built-in command interpreter.
OK

Then it basicly tells you, it cant read from addres 0x1000, because that is apparently where it looks for bootloader or whatever. The solution is to set this offset when programming, so for my case it was:

esptool.py --port COM6 write_flash 0x1000 C:\esp32\micropython\esp32-20171130-v1.9.2-445-g84035f0f.bin
esptool.py v2.2
Connecting........___
Detecting chip type... ESP32
Chip is ESP32D0WDQ6 (revision 1)
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 936288 bytes to 587495...
Wrote 936288 bytes (587495 compressed) at 0x00001000 in 52.2 seconds (effective 143.5 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting...

And then after opening port at 115000bauds you get:

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:4332
load:0x40078000,len:0
load:0x40078000,len:10992
entry 0x4007a6c4
I (204) cpu_start: Pro cpu up.
I (205) cpu_start: Single core mode
I (205) heap_init: Initializing. RAM available for dynamic allocation:
I (208) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (214) heap_init: At 3FFDCD68 len 00003298 (12 KiB): DRAM
I (221) heap_init: At 3FFE0440 len 00003BC0 (14 KiB): D/IRAM
I (227) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (233) heap_init: At 4008FC7C len 00010384 (64 KiB): IRAM
I (240) cpu_start: Pro cpu start user code
I (33) cpu_start: Starting scheduler on PRO CPU.
OSError: [Errno 2] ENOENT
MicroPython v1.9.2-445-g84035f0f on 2017-11-30; ESP32 module with ESP32
Type "help()" for more information.
>>>

@tista3
Copy link

tista3 commented Dec 3, 2017

Thank you @kanalizator
I was running esptool with address 0. Changing it to 0x1000 solved the problem.

@igrr
Copy link
Member

igrr commented Mar 27, 2019

@X-Ryl669 All types of memory are reset following esp_restart (although esp_restart itself is not responsible for this):

  • static memory in .data and .bss segments is initialized by the bootloader
  • heap is initialized by the heap allocator
  • stack is initialized by FreeRTOS (in port.c)

It is possible to have uninitialized variables (usually on the stack) but they will contain values from previous function calls that used the same stack area, not the values before system restart.

@aizukanne
Copy link

Hello,

I have the same issue on a board with ESP32-WROVER-B.
After flashing with the reset option, I can manually reset the board and it works perfectly. However any reset after that results in this error.

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57

I understand the flash in the WROVER-B is 3.3V and I have used efuse to maintain voltage as 3.3V. Prior to the reset, the following are the status of the strapping pins
GPIO0 ---- 1
GPIO2 ---- 0
GPIO5 ---- 0 (connected to LoRa Module)
GPIO12 -- unconnected
GPIO15 -- unconnected

Would appreciate any directions to resolve this.

@projectgus
Copy link
Contributor

Hi @aizukanne ,

Thanks for providing these details. When you say "any reset after that results in this error.", do you mean software resets via esp_restart() only, or also resets of other kinds (esptool.py programming resets, etc)?

@mike-s123
Copy link

Perhaps this is a timing issue? If, when programming the flash, the code doesn't check and wait until write-in-progress (WIP) is clear before doing a reset, the flash may not be ready to be read when boot wants to read.

For a typical SPI flash, a page program may take 2-3 ms to complete. I'd think that adding a 3 ms delay before doing a reset after a flash program can't hurt - no one can reasonably expect reboot timing to be that tight

That could also explain why the issue isn't consistent - it may depend on how long the reset process delays a restart, and a software reset is going to be faster than any reliable hardware one. A longer reset would give the flash time to complete and be ready to be read.

But, maybe I'm way off base - just an idea based on my limited knowledge of the gory details. I can only say that I've run into this issue when doing OTA programming, and the comment about uninitialized variables is off-target - the problem stops a proper boot before my code gets a chance to run. I will add that it doesn't happen often, it was a happy circumstance that I caught in on the serial monitor.

@aizukanne
Copy link

Hi @aizukanne ,

Thanks for providing these details. When you say "any reset after that results in this error.", do you mean software resets via esp_restart() only, or also resets of other kinds (esptool.py programming resets, etc)?

Any reset both software or by pressing a button which pulls EN low. If the esptool.py is run without
--after no-reset
then it occurs immediately after flashing.

@projectgus
Copy link
Contributor

projectgus commented Mar 27, 2019

Hi @mike-s123 & @aizukanne ,

the code doesn't check and wait until write-in-progress (WIP) is clear before doing a reset, the flash may not be ready to be read when boot wants to read.

This is a good idea but I don't think so. All the flash write functions check this flag, and moreover after the OTA write completes, the ESP32 goes back to executing code stored in flash cache - so probably at least a few KB of executable code has been read from flash and executed by the time esp_restart() is called.

EDIT: Actually... maybe not, because esp_restart() is in IRAM and if the bit of code that ran the OTA is already in the cache then it's not impossible that the chip finishes the update and then the next line of code restarts, without it needing to read anything new from flash. Probably adding some code in between the two steps, even just printf("I'm about to restart"); would be enough to cause a flash read though (for the string constant).

If you think it's a timing issue then it may be worth adding a short delay before calling esp_restart() anyhow, just to rule this in or out.

Any reset both software or by pressing a button which pulls EN low

That is quite unexpected, especially as esptool.py --after hard_reset pulls the EN line low by itself - so in theory there should be no difference between esptool.py hard-resetting the board, and pressing the EN button to reset it.

Given you both have WROVER-B modules, this seems like it might be something with the 16MB flash chip model. I'll follow this up with the hardware team and get back to you.

@projectgus
Copy link
Contributor

@aizukanne Is the only way to recover your module also a power cycle?

@mike-s123
Copy link

That is quite unexpected, especially as esptool.py --after hard_reset pulls the EN line low by itself - so in theory there should be no difference between esptool.py hard-resetting the board, and pressing the EN button to reset it.

Except timing. For how long does esptool(.py) hold EN low?

so probably at least a few KB of executable code has been read from flash and executed by the time esp_restart() is called.

If that were the case, why is the boot ROM complaining that it can't read from flash? It can't have its cake, and eat it too!

@projectgus
Copy link
Contributor

Except timing. For how long does esptool(.py) hold EN low?

100ms.

If that were the case, why is the boot ROM complaining that it can't read from flash? It can't have its cake, and eat it too!

Some other things happen during reset and early startup, so it's not impossible. But it's a good question.

I made an edit above about a possible sequence of events, though. Do you have an example of your Arduino code that does the OTA update and then restarts, triggering this problem?

Can either of you also please post the full output of esptool.py -p PORT flash_id and esptool.py -p PORT read_mac?

@aizukanne
Copy link

aizukanne commented Mar 27, 2019

@aizukanne Is the only way to recover your module also a power cycle?

I am unable to recover from this error. However this only occurs when I load Pycom's version of micropython. With Arduino it works ok. No loss of data.

esptool.py -p PORT flash_id

esptool.py v2.6
Serial port COM4
Connecting....
Detecting chip type... ESP32
Chip is ESP32D0WDQ5 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, BLK3 partially reserved, Coding Scheme 3/4
MAC: 30:ae:a4:cc:1c:a0
Uploading stub...
Running stub...
Stub running...
Manufacturer: 20
Device: 4016
Detected flash size: 4MB
Hard resetting via RTS pin...

esptool.py -p PORT read_mac

esptool.py v2.6
Serial port COM4
Connecting....
Detecting chip type... ESP32
Chip is ESP32D0WDQ5 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, BLK3 partially reserved, Coding Scheme 3/4
MAC: 30:ae:a4:cc:1c:a0
Uploading stub...
Running stub...
Stub running...
MAC: 30:ae:a4:cc:1c:a0
Hard resetting via RTS pin...

@projectgus
Copy link
Contributor

@aizukanne Thanks for the details. Confused by "I am unable to recover from this error", do you mean that you have an ESP32 board that is permanently bricked? Or does removing power and re-connecting power bring it back?

@aizukanne
Copy link

@aizukanne Thanks for the details. Confused by "I am unable to recover from this error", do you mean that you have an ESP32 board that is permanently bricked? Or does removing power and re-connecting power bring it back?

When this happens, I am not able to get the device to boot up again. If i flash the firmware again, it works until it is reset. I have been battling with this for a few days now.

@alexiade
Copy link

I have an esp32 that operated normally for 2 days doing 12h sleeps and then bricked with same symptoms. Common aspect -it was aslo flashed with micropython.

@ritwikhota
Copy link

i am facing the same problem also.. i am having esp32 devkit v1... its showing
esptool.py v2.6-beta1
Serial port COM3
Connecting......
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: 24:0a:c4:30:fb:84
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Warning: Could not auto-detect Flash size (FlashID=0xffffff, SizeID=0xff), defaulting to 4MB
Compressed 8192 bytes to 47...

A fatal error occurred: Timed out waiting for packet content
A fatal error occurred: Timed out waiting for packet content

@ritwikhota
Copy link

Screenshot (8)
Screenshot (9)

@X-Ryl669
Copy link
Contributor

X-Ryl669 commented Apr 15, 2019

Warning: Could not auto-detect Flash size (FlashID=0xffffff, SizeID=0xff), defaulting to 4MB

This seems like your flash chip is toasted.
Are you sure the flash's pin are not used in your design?

@ritwikhota
Copy link

NO I HAVENOT CONNECTED ANYTHING
Screenshot (12)

@ritwikhota
Copy link

IS THIS A HARDWARE ISSUE? PLEASE LET ME KNOW ABOUT THIS PROBLEM ASAP.. I HAVE ALREADY WASTED MUCH TIME FOR FIXING THIS ISSUE BT WITHOUT ANY SOLUTION

@projectgus
Copy link
Contributor

Hi @ritwik123

Please stop posting in all caps and copying the same content onto multiple issues. I've replied to you here: espressif/esptool#394 (comment) .

@prasad-dot-ws
Copy link

prasad-dot-ws commented Dec 18, 2019

My problem was that i was using an older IDF template project in the latest ESP-IDF. I get the same error due to ROM bootloader can't find the software bootloader at offset 0x1000. Below is my log and solution,

`W (909) phy_init: failed to load RF calibration data (0x1102), falling back to full calibration
ets Jun 8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371
ets Jun 8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0018,len:4
load:0x3fff001c,len:5684
load:0x40078000,len:14344
load:0x40080400,len:4068
entry `0x4008068c``

Solution: Enable 'App compatible with bootloaders before IDF v2.1' option in menuconfig
→ Component config → ESP32-specific → App compatible with bootloaders before IDF v2.1

Ref: https://www.esp32.com/viewtopic.php?t=3939

PS: This error threw only if i use bluetooth, Otherwise it worked fine.

@CJ0104
Copy link

CJ0104 commented Jan 22, 2020

if you error look like this
image

1.Run "idf.py menuconfig" , select "Security features"
image
Make sure it look like this ,if there are '*' ,type space or 'N' to cancel it.
Exit and Save.
2.Run "idf.py menuconfig" AGAIN !! ,make sure your option has been saved.
3.Run "idf.py build"
4.Run "idf.py -p COMX flash"
5.Find your esptool.py location
image
This is my location.

6.Run "python esptool.py --chip esp32 --port com5 --baud 115200 --before default_reset --after hard_reset erase_flash"

7.Run "python espefuse.py -p com5 burn_efuse FLASH_CRYPT_CNT"
It will ask you to type "BURN",just do it.
8.Flash hello_world to test.

Sorry for my poor English .

@projectgus
Copy link
Contributor

Hi @CJ0104 ,

Thanks for the advice but please note that flash read err, 1000 can have difference causes and following these steps may break the board not fix it.

Before running these steps run the command "espefuse.py -p PORT summary" and check the value of FLASH_CRYPT_CNT.

  • If FLASH_CRYPT_CNT value is 0, the error is unrelated to flash encryption and these steps might make it worse not better (by enabling flash encryption for no reason).
  • If FLASH_CRYPT_CNT value is non-zero, following these steps may help by disabling flash encryption that was previously enabled via efuse but is not working correctly.

@CJ0104
Copy link

CJ0104 commented Jan 23, 2020 via email

@johncblacker
Copy link

johncblacker commented Jan 23, 2020 via email

@johncblacker
Copy link

One of the major problems with "fuses" is that changing the security fuse just adds 1 to the current value; then, when it's checked if it's an even number it means one thing and odd another. You cannot input a specific value for the security fuse (unless they've changed things recently).

@seeul8er
Copy link

I was getting
rst:0x10 (RTCWDT_RTC_RESET), boot:0x13 (SPI_FAST_FLASH_BOOT) flash read err, 1000 ets_main.c 371

after only running app via CMAKE. Running flash wand rewriting the bootloader fixed it for me.

@Kashyapkoshti
Copy link

rst:0x10 (RTCWDT_RTC_RESET),boot:0x1f (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371

I am getting this error in my esp32 devkit v1
How to solve it?
I am using arduino IDE for programming the esp32.

@alexvazquez
Copy link

App compatible with bootloaders before IDF v2.1

Hi, where can I enable this under PlatformIO? Appreciate it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests