idf.py flash stops after first block

fbeaulier
Posts: 10
Joined: Wed Oct 31, 2018 10:08 am

idf.py flash stops after first block

Postby fbeaulier » Thu Jun 24, 2021 8:23 am

Hello forum,

I put an ESP32-WROOM-32D on my board with a 6 pins connector to flash it.
The connector provides 3V3 / GND / RXD / TXD / EN / IO0
On a small board i made a adapter that works with an FTDI USB/Serial cable, using two transistors to drive EN and IO0 from DTR and RTS. I made it from the ESP-DEVKITC V4 bord schematics.

When i do an idf.py flash, it flashes a first block but then fails in timeout.
See the console output below.

Any idea ? I'm confused by the fact that it works at the beginning, the connexion is good, and then it stops.

Thanks for any help.

Francois

Code: Select all

esptool.py --chip esp32 -p /dev/ttyUSB0 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 4MB 0x8000 partition_table/partition-table.bin 0x1000 bootloader/bootloader.bin 0x10000 h1wless.bin
esptool.py v3.0
Serial port /dev/ttyUSB0
Connecting....
Chip is ESP32-D0WD (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: a4:e5:7c:6f:22:30
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Compressed 3072 bytes to 105...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (105 compressed) at 0x00008000 in 0.0 seconds (effective 1546.9 kbit/s)...

A fatal error occurred: Timed out waiting for packet header
CMake Error at run_cmd.cmake:14 (message):
  esptool.py failed
Call Stack (most recent call first):
  run_esptool.cmake:21 (include)


make[3]: *** [CMakeFiles/flash.dir/build.make:57 : CMakeFiles/flash] Erreur 1
make[2]: *** [CMakeFiles/Makefile2:1865 : CMakeFiles/flash.dir/all] Erreur 2
make[1]: *** [CMakeFiles/Makefile2:1872 : CMakeFiles/flash.dir/rule] Erreur 2
make: *** [Makefile:177 : flash] Erreur 2
make failed with exit code 2

chegewara
Posts: 2378
Joined: Wed Jun 14, 2017 9:00 pm

Re: idf.py flash stops after first block

Postby chegewara » Thu Jun 24, 2021 8:58 am

Try to keep IO0 connected to GND when you flash.

fbeaulier
Posts: 10
Joined: Wed Oct 31, 2018 10:08 am

Re: idf.py flash stops after first block

Postby fbeaulier » Thu Jun 24, 2021 9:21 am

Thank you for the answer chegewara.
Just tried that but same behavior.

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: idf.py flash stops after first block

Postby ESP_Sprite » Thu Jun 24, 2021 10:07 am

Hm, are you absolutely 100% sure the pads of the WROOM that are connected to the internal flash (generally the pads on the bottom of the module) aren't connected to anything or shorted to ground or each other? An error like this usually indicates there's something wrong with communication with the flash.

fbeaulier
Posts: 10
Joined: Wed Oct 31, 2018 10:08 am

Re: idf.py flash stops after first block

Postby fbeaulier » Thu Jun 24, 2021 12:52 pm

Thank you ESP_Sprite for the tip.
It should not be connected to anything but i will double check

fbeaulier
Posts: 10
Joined: Wed Oct 31, 2018 10:08 am

Re: idf.py flash stops after first block

Postby fbeaulier » Fri Jun 25, 2021 10:02 am

Thanks a lot ESP_Sprite you were right !
I had a pullup on SD2 and that was the issue, now flashing works well.

ESP_Sprite
Posts: 9764
Joined: Thu Nov 26, 2015 4:08 am

Re: idf.py flash stops after first block

Postby ESP_Sprite » Sat Jun 26, 2021 5:18 am

Glad to hear you got it fixed!

Who is online

Users browsing this forum: Google [Bot] and 46 guests