Timed out waiting for packet header during Flash

halfshellher0
Posts: 5
Joined: Mon Dec 19, 2016 11:46 pm

Timed out waiting for packet header during Flash

Postby halfshellher0 » Fri Dec 30, 2016 8:26 pm

Hello all,

I've been having some trouble flashing an esp-32 module I have soldered to a breakout board. I have successfully flashed a few of the examples on a sparkfun esp32 thing development board, but I'm not having any luck with this one.

I have serial communication with the board, and it seems I'm able to get it in download-boot mode:

Code: Select all

rst:0x1 (POWERON_RESET),boot:0x23 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
but when I try to make flash the hello world example, I'm getting this output:

Code: Select all

Flashing binaries to serial port COM7 (app at offset 0x10000)...
esptool.py v2.0-dev
Connecting...
Uploading stub...
Running stub...
Stub running...
Attaching SPI flash...
Configuring flash size...
Compressed 7200 bytes to 4194...
Wrote 7200 bytes (4194 compressed) at 0x00001000 in 0.4 seconds (effective 150.4 kbit/s)...

A fatal error occurred: Timed out waiting for packet header
make: *** [/e/ESP32/esp-idf//components/esptool_py/Makefile.projbuild:48: flash] Error 2
It looked like it completed the first stage of the write, but failed before the second stage started.

When I do a normal reset, it seems to be resetting itself every second or so with this serial output:

Code: Select all

rst:0x10 (RTCWDT_RTC_RESET),boot:0x37 (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:0x37 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
Falling back to built-in command interpreter.
OK
>ets Jun  8 2016 00:22:57
Does anyone have an idea of what might be causing this?

ESP_Angus
Posts: 1649
Joined: Sun May 08, 2016 4:11 am

Re: Timed out waiting for packet header during Flash

Postby ESP_Angus » Tue Jan 03, 2017 12:25 am

Hi halfsheller,

How are you powering the module? A lot of the time these kind of problems are due to brownouts - make sure your 3.3V supply has enough current capacity, and add some bulk capacitance near the module if there isn't already some.

Angus

halfshellher0
Posts: 5
Joined: Mon Dec 19, 2016 11:46 pm

Timed out waiting for packet header during Flash

Postby halfshellher0 » Wed Jan 04, 2017 4:03 am

Hey Angus,

Thanks for the response. I tried powering the esp with a lab supply, also added some capacitance, but I'm still getting the same output.

I noticed when I leave GPIO2 floating I can't even get to that second stage and just get the following output:

Code: Select all

$ make flash
Flashing binaries to serial port COM7 (app at offset 0x10000)...
esptool.py v2.0-dev
Connecting...

A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
make: *** [/e/ESP32/esp-idf//components/esptool_py/Makefile.projbuild:48: flash] Error 2
But when I pull GPIO2 up I at least get to that second stage of the flash, which tells me its at least partially flashing? not sure if thats relevant:

Code: Select all

$ make flash
Flashing binaries to serial port COM7 (app at offset 0x10000)...
esptool.py v2.0-dev
Connecting...
Uploading stub...
Running stub...
Stub running...
Attaching SPI flash...
Configuring flash size...
Compressed 7200 bytes to 4194...
Wrote 7200 bytes (4194 compressed) at 0x00001000 in 0.4 seconds (effective 150.4 kbit/s)...

A fatal error occurred: Timed out waiting for packet header
make: *** [/e/ESP32/esp-idf//components/esptool_py/Makefile.projbuild:48: flash] Error 2
Its entirely possible that I messed up soldering this chip to the breakout board, as I've always had success flashing on the development board from sparkfun. I just thought it was weird that it seemed to be powering up fine and communicating with the serial terminal which made me think the soldering was OK, but now I'm second guessing it.

Who is online

Users browsing this forum: No registered users and 20 guests