WDT Reset my ESP boards (ESP32/ESP8266)

The board reset and will not connect to the my access point.
please i need help.
I added ESP.wdtDisable(); ESP.wdtEanble( …); and ESP.wdtFeed();
but still, the problem persist.

I updated the firmware to esp8266-20170526-v1.9.bin but no success.
This is the print on my terminal when the board reset.
ets Jan 8 2013,rst cause:4, boot mode:(3,2)

wdt reset
load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d

void setup() 
  pinMode(relay1, OUTPUT);
  pinMode(relay2, OUTPUT);
  pinMode(relay3, OUTPUT);
  pinMode(relay4, OUTPUT);
  Serial.println("Connecting to");
  WiFi.begin(ssid, pass);

  while (WiFi.status() != WL_CONNECTED)
    digitalWrite(ledpin, !digitalRead(ledpin));
  Serial.println("WiFi connected");
  //Blynk.begin(auth, ssid, pass);
This is my loop after reading from different forum to add ESP.wdtFeed();
void loop()

Please edit your post and add triple backticks at the beginning and end of your code so that it displays correctly.
Triple backticks look like this:

Exactly which board are you using, and what settings are you using when you upload your sketch?

That doesn’t achieve anything, as it’s immediately overwritten when you upload the sketch. The standard firmware is only used when the device acts as a Wi-Fi modem for another board, in AT mode.

Do you have anything connected to your board - any sensors etc? If you do then remove them and flash a straightforward code example from Sketch Builder - without any of the WDT stuff, as it shouldn’t be necessary.


I am using NodeMCU ESP8266 -12
The flash speed 112500
CPU Frequency 160MHz
Few minutes ago, i discovered, if i call pinMode(3, OUTPUT); for pin 3 & 4, it work fine. but when i did it pinMode(relay1, OUTPUT); and int relay1 =3; as global variable. the error resurface.

Please fix your unformatted code, otherwise it will be deleted.


Sorry, I have added the triple backticks.

My guess is that you’re using an inappropriate GPIO, and possibly confusing the NodeMCU PIN numbers with GPIOs.
You should read this:


HI. have you solved? I’m in the same situation with esp32 and 8266 boards not connected to any peripheral. The code does not reach the loop() code and crash after the connection with a WDT dump