esp32 not responsing

All ESP32 boards running MicroPython.
Target audience: MicroPython users with an ESP32 board.
Post Reply
kr-g
Posts: 48
Joined: Sun Dec 01, 2019 7:52 pm
Contact:

esp32 not responsing

Post by kr-g » Sat Nov 21, 2020 7:11 pm

i do have a strange behaviour with my esp32 board.
it stopped responding over serial.
also erase flash with esptool do not work

Code: Select all

esptool.py --chip esp32 --port /dev/ttyUSB0 erase_flash
esptool.py v3.0
Serial port /dev/ttyUSB0
Connecting........_____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
when i connect with mpycntrl

Code: Select all

python -m mpycntrl -f -tr -port /dev/ttyUSB0
and press then RST it gives the following output
rst:0x1 (POWERON_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:5148
load:0x40078000,len:14040
load:0x40080400,len:3764
entry 0x40080630
I (608) psram: This chip is ESP32-D0WD
I (609) spiram: Found 64MBit SPI RAM device
I (609) spiram: SPI RAM mode: flash 40m sram 40m
I (612) spiram: PSRAM initialized, cache is in low/high (2-core) mode.
I (619) cpu_start: Pro cpu up.
I (623) cpu_start: Application information:
I (628) cpu_start: Compile time: Sep 2 2020 03:05:32
I (634) cpu_start: ELF file SHA256: 0000000000000000...
I (640) cpu_start: ESP-IDF: v4.0.1
I (644) cpu_start: Starting app cpu, entry point is 0x40082d40
I (0) cpu_start: App cpu up.
I (1520) spiram: SPI SRAM memory test OK
I (1521) heap_init: Initializing. RAM available for dynamic allocation:
I (1521) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (1527) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (1533) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (1539) heap_init: At 3FFBDB5C len 00000004 (0 KiB): DRAM
I (1545) heap_init: At 3FFCAF38 len 000150C8 (84 KiB): DRAM
I (1552) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1558) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1565) heap_init: At 4009AD20 len 000052E0 (20 KiB): IRAM
I (1571) cpu_start: Pro cpu start user code
I (1590) spi_flash: detected chip: generic
I (1590) spi_flash: flash io: dio
I (1591) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
MicroPython v1.13 on 2020-09-02; ESP32 module (spiram) with ESP32
Type "help()" for more information.
with mpfshell ...

Code: Select all

mpfshell ttyUSB0
it hangs forever.

i have upgraded esptool.py, but this also not resolved the problem...

Code: Select all

esptool.py version
esptool.py v3.0
3.0
one remark:
after it occured i connected with WebRepl and deleted "boot.py" - but no effect :-/

any idea ???

kr-g
Posts: 48
Joined: Sun Dec 01, 2019 7:52 pm
Contact:

Re: esp32 not responsing

Post by kr-g » Sun Nov 22, 2020 3:51 am

another remark:

when running

Code: Select all

esptool.py --chip esp32 --port /dev/ttyUSB0 erase_flash
the green led blinks.

AwesomeCronk
Posts: 33
Joined: Fri Oct 11, 2019 1:24 am

Re: esp32 not responsing

Post by AwesomeCronk » Fri Nov 27, 2020 1:37 pm

What ESP32 board do you have?

kr-g
Posts: 48
Joined: Sun Dec 01, 2019 7:52 pm
Contact:

Re: esp32 not responsing

Post by kr-g » Sun Nov 29, 2020 7:38 pm

here some pic's
Attachments
20201129_124706.jpg
20201129_124706.jpg (189.97 KiB) Viewed 4112 times
20201129_124656.jpg
20201129_124656.jpg (266.43 KiB) Viewed 4112 times

kr-g
Posts: 48
Joined: Sun Dec 01, 2019 7:52 pm
Contact:

Re: esp32 not responsing

Post by kr-g » Sun Nov 29, 2020 7:39 pm

frankly - what's the official name - no idea

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: esp32 not responsing

Post by Roberthh » Sun Nov 29, 2020 8:05 pm

It seems to be a LilyGO T-Koala.

https://github.com/LilyGO/T-Koala and
http://myosuploads3.banggood.com/produc ... TYPE-C.pdf

So you tell that it worked once but no more, and esptool fails. Does esptool work, if you set the device manually to boot mode byte connection GPIO0 to GND and pushing reset?

kr-g
Posts: 48
Joined: Sun Dec 01, 2019 7:52 pm
Contact:

Re: esp32 not responsing

Post by kr-g » Mon Nov 30, 2020 6:51 am

good point. thanks.

i have to admit that i haven't thought into this direction after seeing the data coming in over serial with mpycntrl.

but can't try it now because i m not at home (traveling for a while) and i don't have a small cable with me.

i also dont't have a resistor with me (see here under "IMPORTANT" section at the beginning https://github.com/espressif/esptool/wi ... -Selection)

to be on the save side when bridging GPIO0 to GND

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: esp32 not responsing

Post by Roberthh » Mon Nov 30, 2020 7:04 am

I never used a resistor for pulling GPIO0 low.

kr-g
Posts: 48
Joined: Sun Dec 01, 2019 7:52 pm
Contact:

Re: esp32 not responsing

Post by kr-g » Tue May 25, 2021 4:05 am

finally back... now i connected a 10k resistor, and run the cmd

Code: Select all

python -m mpycntrl -f -tr -port /dev/ttyUSB0
then when pressing RST button following comes over serial

Code: Select all

ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download
when i try then with esptool

Code: Select all

esptool.py --chip esp32 --port /dev/ttyUSB0 erase_flash
it still gives me (with connected resistor, and also without)

Code: Select all

esptool.py v3.0
Serial port /dev/ttyUSB0
Connecting........_____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

User avatar
karfas
Posts: 193
Joined: Sat Jan 16, 2021 12:53 pm
Location: Vienna, Austria

Re: esp32 not responsing

Post by karfas » Tue May 25, 2021 7:45 am

Try setting a lower baudrate. I experienced similar effects (maybe caused by faulty/too long USB cables).

I don't remember the default speeds for the various tools, but my build script defines

Code: Select all

export ESPTOOL_BAUD=115200              # esptool.py
export AMPY_BAUD=$ESPTOOL_BAUD          # ampy
export BAUD=$ESPTOOL_BAUD               # micropython Makefile
export ESPBAUD=$ESPTOOL_BAUD            # idf.py
export IDF_MONITOR_BAUD=$ESPTOOL_BAUD   # idf.py
A few hours of debugging might save you from minutes of reading the documentation! :D
My repositories: https://github.com/karfas

Post Reply