[SOLVED]ESP bootloop

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

[SOLVED]ESP bootloop

#1 Post by mackowiakp » 12 Jul 2022, 14:38

I made a minor change to the ESP8266 (4M/1M) configuration and the device stopped working.
The terminal shows the following messages:

Code: Select all

wdt reset                                                                               
load 0x4010f000, len 1384, room 16                                                      
tail 8                                                                                  
chksum 0x2d                                                                             
csum 0x2d                                                                               
vbc204a9b                                                                               
~ld                                                                                     
   �U73 : Info  :                                                                       
                                                                                        
INIT : Booting version: Skrzypowa: Dec  9 2019 11:20:48 (ESP82xx Core bc204a9b, NONOS SDK 2.2.2-dev(38a443e))
74 : Info  : INIT : Free RAM:33216                                                      
75 : Info  : INIT : Warm boot #1 Last Task: Task Device timer, id: 8 - Restart Reason: Hardware Watchdog
77 : Info  : FS   : Mounting...                                                         
102 : Info  : FS   : Mount successful, used 82328 bytes of 957314                       
118 : Info  : CRC  : No program memory checksum found.                                  
 ets Jan  8 2013,rst cause:4, boot mode:(3,7)                                           
                                                                                        
wdt reset
load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
vbc204a9b
~ld
   �U73 : Info  : 

INIT : Booting version: Skrzypowa: Dec  9 2019 11:20:48 (ESP82xx Core bc204a9b, NONOS SDK 2.2.2-dev(38a443e))
74 : Info  : INIT : Free RAM:33216
75 : Info  : INIT : Warm boot #2 Last Task: Task Device timer, id: 8 - Restart Reason: Hardware Watchdog
77 : Info  : FS   : Mounting...
102 : Info  : FS   : Mount successful, used 82328 bytes of 957314
119 : Info  : CRC  : No program memory checksum found. 
 ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x4010f000, len 1384, room 16 
tail 8
chksum 0x2d
csum 0x2d
vbc204a9b
~ld
   �U72 : Info  : 

INIT : Booting version: Skrzypowa: Dec  9 2019 11:20:48 (ESP82xx Core bc204a9b, NONOS SDK 2.2.2-dev(38a443e))
73 : Info  : INIT : Free RAM:33216
75 : Info  : INIT : Warm boot #3 Last Task: Task Device timer, id: 8 - Restart Reason: Hardware Watchdog
77 : Info  : FS   : Mounting...
102 : Info  : FS   : Mount successful, used 82328 bytes of 957314
118 : Info  : CRC  : No program memory checksum found. 
 ets Jan  8 2013,rst cause:4, boot mode:(3,7)
I'd like to reset flash and restore from FW backup (quite old) and config, rules etc.
However, I can't program an "empty" FW, esptool.py shows as below.

Code: Select all

[root@Piotr ESP]# esptool.py --baud 115200 --port /dev/ttyUSB1 write_flash 0x00000 /home/maciek/TMP/blank_4MB.bin 
esptool.py v3.2
Serial port /dev/ttyUSB1
Connecting......................................

A fatal error occurred: Failed to connect to Espressif device: No serial data received.
For troubleshooting steps visit: https://github.com/espressif/esptool#troubleshooting
I tried to press the "Flash" button, short GPIO0 to GND, similarly to GPIO2 - but no success.
Can I save this ESP somehow or will I have to soldering everything from scratch?
Any idea to solve the problem?

EDIT:
Shorting TX and RX does not helps too
Last edited by mackowiakp on 12 Jul 2022, 19:46, edited 1 time in total.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP bootloop

#2 Post by TD-er » 12 Jul 2022, 18:11

GPIO-0 to GND and then power up. That should put the ESP into flash mode.
Best keep it shorted till the flash is done.

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: ESP bootloop

#3 Post by mackowiakp » 12 Jul 2022, 18:45

Still no success :-(

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP bootloop

#4 Post by TD-er » 12 Jul 2022, 18:50

What changes did you make?
If the ESP boot loops, it will eventually disable tasks, to make it boot with the plugin causing the crash being disabled.

Unless of course no plugin causes this reboots.

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: ESP bootloop

#5 Post by mackowiakp » 12 Jul 2022, 18:53

I added AM2301 sensor to free GPIO. <Submit> -> crash

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP bootloop

#6 Post by TD-er » 12 Jul 2022, 18:55

Which build?
And at which plugin position did you add it?
The ESP needs to reboot 10 + task position to disable that task.

Did you only add it, or also enable it?

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: ESP bootloop

#7 Post by mackowiakp » 12 Jul 2022, 19:04

Build quite old...
Firmware
Build:⋄ 20104 - Mega
System Libraries:⋄ ESP82xx Core bc204a9b, NONOS SDK 2.2.2-dev(38a443e), LWIP: 2.1.2 PUYA support
Git Build:⋄ Skrzypowa: Dec 9 2019 11:20:48
Plugins:⋄ 36 [Normal]
Build Time:⋄ Dec 9 2019 11:14:55
Binary Filename:⋄ Self built!
Plugin position - 9
I only add plugin and congigure it but do not enable

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: ESP bootloop

#8 Post by mackowiakp » 12 Jul 2022, 19:08

Test unit with only AM2301 sensor connected, works properly with the same FW.

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: ESP bootloop

#9 Post by mackowiakp » 12 Jul 2022, 19:15

Terminal logs stands that it is FW CRC problem. So - probably - FW is couupted.
It is easy to restore FW, config etc. But it is impossible to flash it.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP bootloop

#10 Post by TD-er » 12 Jul 2022, 19:16

Is the sensor connected to the pins configured in that task?
If not, please try with the sensor connected.

And another thing you can try is either pulling that pin high, or low.
Perhaps the plugin is waiting for the pin to get into a specific state.
Maybe this old build did not yet check for all tasks to be enabled before trying to communicate with it.

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: ESP bootloop

#11 Post by mackowiakp » 12 Jul 2022, 19:19

The sensor is connected...

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: ESP bootloop

#12 Post by mackowiakp » 12 Jul 2022, 19:33

I didn't know that after a 10 reboot the plugin was disabled. I waited those 10 reboots and it started working.
I mean, I have established communication with the device.
I've made corrections and so far it's OK.
Thanks to you TD-er! You always offer good advice!

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: ESP bootloop

#13 Post by TD-er » 12 Jul 2022, 19:48

The feature to disable tasks was added after I ran into similar issues.
So this protection mechanism was added as it is quite easy to lock yourself out of the system.

What I do find strange is that you could not get the unit to boot into flash mode.

mackowiakp
Normal user
Posts: 527
Joined: 07 Jun 2018, 06:47
Location: Gdynia/Poland

Re: [SOLVED]ESP bootloop

#14 Post by mackowiakp » 12 Jul 2022, 19:55

What I do find strange is that you could not get the unit to boot into flash mode.
Yes, its strange.
But I am happy to unbrick my unit at this moment ;-)

Post Reply

Who is online

Users browsing this forum: No registered users and 30 guests