unexpected wdt reset on esp8266 nodemcu v3

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
gustav2040
Posts: 2
Joined: Sat Aug 06, 2022 6:09 pm

unexpected wdt reset on esp8266 nodemcu v3

Post by gustav2040 » Thu Aug 11, 2022 3:09 pm

Hi, this is my first post and I couldn't really find a previous topic that could help me. I've recently bought a nodemcu v3 esp8266 board with 4mb of flash to experiment with and tried installing the latest micropython firmware to it and started getting some weird resets related to the watchdog. I've got no code on it, just the bare install of the firmware and an empty boot.py I'm familiar with micropython from using an esp32 dev board.

I've tried using a couple of versions of the firmware for the esp8266 and all of them are giving me the same reset.
v1.19.1 (2022-06-18) .bin
v1.18 (2022-01-17) .bin
v1.17 (2021-09-02) .bin
I used esptool.py to erase the flash and flash micropython to it. the commands and the output is listed below:

Code: Select all

> esptool.py --chip esp8266 erase_flash

esptool.py v4.1
Found 1 serial ports
Serial port COM5
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: xx:xx:xx:xx:xx:xx (edited for security)
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 12.7s
Hard resetting via RTS pin...

> esptool.py --chip esp8266 --baud 115200 write_flash --flash_size=detect 0 .\esp8266-20220117-v1.18.bin

esptool.py v4.1
Found 1 serial ports
Serial port COM5
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: xx:xx:xx:xx:xx:xx (edited for security)
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00000000 to 0x0009bfff...
Flash params set to 0x0040
Compressed 635992 bytes to 418427...
Wrote 635992 bytes (418427 compressed) at 0x00000000 in 37.0 seconds (effective 137.4 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
the reset traceback is listed below:

Code: Select all

ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x40100000, len 30720, room 16 
tail 0
chksum 0x0f
load 0x3ffe8000, len 1012, room 8 
tail 12
chksum 0x00
ho 0 tail 12 room 4
load 0x3ffe8400, len 1080, room 12 
tail 12
chksum 0x87
csum 0x87
If I try uploading code from arduino IDE the resets disappear, so it leaves me wondering if it's something related to micropython.

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

Re: unexpected wdt reset on esp8266 nodemcu v3

Post by Roberthh » Thu Aug 11, 2022 3:19 pm

If you never get a Python prompt, try the various flash modes offered by esptool.py.

gustav2040
Posts: 2
Joined: Sat Aug 06, 2022 6:09 pm

Re: unexpected wdt reset on esp8266 nodemcu v3

Post by gustav2040 » Thu Aug 11, 2022 3:51 pm

I do get a REPL, but it always gets interrupted by the wdt reset

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

Re: unexpected wdt reset on esp8266 nodemcu v3

Post by Roberthh » Thu Aug 11, 2022 3:53 pm

Anyhow, try the other flash modes.

User avatar
scruss
Posts: 360
Joined: Sat Aug 12, 2017 2:27 pm
Location: Toronto, Canada
Contact:

Re: unexpected wdt reset on esp8266 nodemcu v3

Post by scruss » Thu Aug 11, 2022 4:31 pm

Other flash modes are good for this board. I dug out a LoLin NodeMCU v3, and did this:

Code: Select all

esptool.py --chip esp8266 erase_flash
esptool.py v4.1
Found 2 serial ports
Serial port /dev/cu.usbserial-1420
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: xx:xx:xx:xx:xx:xx (edited for security)
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 8.7s
Hard resetting via RTS pin...

esptool.py --chip esp8266 --baud 460800 write_flash --flash_size=detect -fm dout 0 esp8266-20220618-v1.19.1.bin 
esptool.py v4.1
Found 2 serial ports
Serial port /dev/cu.usbserial-1420
Connecting....
Chip is ESP8266EX
Features: WiFi
Crystal is 26MHz
MAC: xx:xx:xx:xx:xx:xx (edited for security)
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 4MB
Flash will be erased from 0x00000000 to 0x0009afff...
Flash params set to 0x0340
Compressed 634844 bytes to 419808...
Wrote 634844 bytes (419808 compressed) at 0x00000000 in 10.6 seconds (effective 481.0 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
then opening the device in a serial terminal:

Code: Select all

screen /dev/tty.usbserial-1420 115200

�������������������������
>>> 
MPY: soft reboot
MicroPython v1.19.1 on 2022-06-18; ESP module with ESP8266
Type "help()" for more information.
>>> 
I only got the chevron prompt after entering Ctrl-D to soft reboot MicroPython, but otherwise it's been solid in both Thonny and screen

Post Reply