-->
Page 1 of 8

WDT reset every 30 seconds

PostPosted: Thu Jul 09, 2015 12:37 pm
by WStan
ESP8266-01 Test in Arduino.ide for ESP
code:

Code: Select allint Count=0;
int led = 0;

void setup() {         
Serial.begin(115200);
pinMode(led, OUTPUT);     
}
void loop() {
  digitalWrite(led, HIGH);   
  delay(500);               
  digitalWrite(led, LOW);   
  delay(500);             
Count++;
Serial.print(Count);
Serial.println(" times");
}

Results:
1. Wireless Router LinkSys WRTU54G is On: Counter reaches 30 and WDT reset is executed
2. Wireless Router LinkSys WRTU54G is Off: Counter increases, no WDT reset is executed

What can I do for avoiding WDT Resets?

Re: WDT reset every 30 seconds

PostPosted: Fri Jul 10, 2015 5:19 am
by tytower
Read on this forum . There is a function to turn off watchdog timer

Re: WDT reset every 30 seconds

PostPosted: Fri Jul 10, 2015 6:20 am
by WStan
With wdt_disable (); the program stops after 50 seconds.
Above listed Led Blink program is just the example. The problem is that the system periodically resets itself every few seconds, and only when my home wifi router is turned on., No matter what the program is executed.

Re: WDT reset every 30 seconds

PostPosted: Fri Jul 10, 2015 10:53 am
by burkmurray
When you say "router," do you mean your WiFi AP? And does your code #include any libraries, or did you quote all of it above?

My guess is that the ESP8266 is trying to connect to your WiFi and failing because the library isn't loaded. Try adding:

Code: Select all#include <ESP8266WiFi.h>


You may also need to set WiFi.mode.