ESP32 Flashing upload starts and fails with timeout

徘徊边缘 提交于 2020-06-01 06:19:06

问题


I have an ESP32-WROOM, as seen here.

In the Arduino IDE, I compile and verify my sketch, and then attempt an upload.

I get the following error:

esptool.py v2.1
Connecting........___
Chip is ESP32D0WDQ6 (revision (unknown 0xa))
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
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

Invalid library found in /Users/me/Documents/Arduino/hardware/espressif/esp32/libraries/BLE: no headers files (.h) found in /Users/me/Documents/Arduino/hardware/espressif/esp32/libraries/BLE
Invalid library found in /Users/me/Documents/Arduino/hardware/espressif/esp32/libraries/BLE: no headers files (.h) found in /Users/me/Documents/Arduino/hardware/espressif/esp32/libraries/BLE

I am using these settings in the IDE for the upload:

I changed the baud rate to 115200, and then also watched the serial monitor, where i saw the following messages appear:

ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0371 
⸮ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x23 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
ts Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x33 (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:0x33 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 37⸮ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x23 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
ts Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x33 (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:0ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x23 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
ts Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x33 (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:0x33 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 37ets Jun  8 2016 00:22:57

rst:0x10 (RTCWDT_RTC_RESET),boot:0x23 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
ts Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
flash read err, 1000
ets_main.c 371 
(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:0x23 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
ts Jun  8 2016 00:22:57

This is followed by:

esptool.py v2.1 Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._____.....____An error occurred while uploading the sketch _

A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header on the Arduino IDE.

Please help me to understand what I need to do to make this sketch upload work direct to the ESP chip.


回答1:


You want the 115200 baud setting.

I believe you are getting this error because the ESP32 is not in flash mode. Your computer is timing out waiting for the ESP32.

Connecting........_____....._____....._____....._____....._____....._____....._____....._____....._____.....____An error occurred while uploading the sketch _

Hold both the BOOT and EN, then release EN. If you have two button on your device, hold one and press the other. If that doesn't work then try the other hold/press button combination :)




回答2:


One should need to disconnect the Vin pin until the code is successfully uploaded and keep pressing the BOOT button while uploading the sketch until the Connecting.. line disappears.




回答3:


You can make the ESP32 automatically go into flash mode by connecting a 10uF electrolytic capacitor between EN and GND. Make sure you observer the capacitor's polarity. You can solder the capacitor onto the ESP32 board, as shown in the attached image. How to add an auto-enter-flash-mode capacitor on an ESP32

Credit should go to Make ESP32 auto-enter flash mode



来源:https://stackoverflow.com/questions/57596413/esp32-flashing-upload-starts-and-fails-with-timeout

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!