Skip to content

WiFi.begin() causes exception 3 #7373

Closed
@xsrf

Description

@xsrf

Basic Infos

  • This issue complies with the issue POLICY doc.
  • I have read the documentation at readthedocs and the issue is not addressed there.
  • I have tested that the issue is present in current master branch (aka latest git).
  • I have searched the issue tracker for a similar issue.
  • If there is a stack dump, I have decoded it.
  • I have filled out all fields below.

Platform

  • Hardware: ESP8266 on WeMos D1 Mini R2
  • Core Version: 89d0c78
  • Development Env: Platformio
  • Operating System: Windows

Settings in IDE

platformio.ini

[env:d1_mini]
platform = espressif8266
platform_packages =
  ; use upstream Git version
  framework-arduinoespressif8266 @ https://github.com/esp8266/Arduino.git#89d0c78703e7a4bb627f9c69e237618add0f8de3
board = d1_mini
framework = arduino
monitor_speed = 115200
upload_speed = 921600

Problem Description

WiFi.begin() causes exception 3 (LoadStoreErrorCause: Processor internal physical address or data error during load or store)

MCVE Sketch

#include <Arduino.h>
#include <ESP8266WiFi.h>

void setup() {
  Serial.begin(115200);
  Serial.println("Before begin()");
  delay(500);
  WiFi.begin("test","testtesttest");
  delay(500);
  Serial.println("After begin()");
}

void loop() {
  Serial.println(WiFi.status());
  Serial.println(WiFi.localIP());
  delay(500);
}

Debug Messages


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

load 0x4010f000, len 3664, room 16 
tail 0
chksum 0xee
csum 0xee
v89d0c787
~ld
Before begin()

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

Exception (3):
epc1=0x40100718 epc2=0x00000000 epc3=0x00000000 excvaddr=0x400081e9 depc=0x00000000

>>>stack>>>

ctx: cont
sp: 3ffffba0 end: 3fffffc0 offset: 0190
3ffffd30:  feefeffe feefeffe feefeffe feefeffe
3ffffd40:  feefeffe feefeffe feefeffe feefeffe
3ffffd50:  feefeffe feefeffe feefeffe 3fffff00  
3ffffd60:  0000049c 0000049c 00000020 40100902
3ffffd70:  feefeffe feefeffe feefeffe feefeffe  
3ffffd80:  00000000 400042db 000003fd 40100b50
3ffffd90:  40004b31 00001000 000003fd 4010027c  
3ffffda0:  40105b1c feefeffe feefeffe 4022d1e5
3ffffdb0:  40100c1d 4022d2cf 3ffef05c 0000049c  
3ffffdc0:  000003fd 3fffff00 3ffef05c 4022d2b2
3ffffdd0:  ffffff00 55aa55aa 0000009a 00000020  
3ffffde0:  00000020 0000008b 0000008a aa55aa55  
3ffffdf0:  000003ff 4022d7b2 3ffef05c 3ffef05c
3ffffe00:  000000ff 000000db 000000db 40100647  
3ffffe10:  40100c1d 00000001 3ffef06c 4022d9d2
3ffffe20:  00000008 3ffef05c 000000ff 3fffff00  
3ffffe30:  3fffff20 3ffef093 0000009a 00000020
3ffffe40:  3ffef11c 3fffff61 00000001 4022da82
3ffffe50:  3fffff00 40239bd0 00000000 0000000c  
3ffffe60:  3ffef45c 3fffff20 3fff5394 4022da51  
3ffffe70:  3ffef05c 4022dab8 3ffe84cc 3ffe8623
3ffffe80:  4020194a 3ffe8623 3ffe861b 4020189f
3ffffe90:  3ffec400 3fff4cd4 00000020 401009bf  
3ffffea0:  00000020 000000ca 000000cb aa55aa55
3ffffeb0:  00000300 4024984b 00000000 40100378  
3ffffec0:  3ffec4d4 00000001 3fff2634 40249866
3ffffed0:  40249896 00000001 00000001 00000001  
3ffffee0:  40202cf2 3fff2634 0000000a feefeffe
3ffffef0:  d5103800 fe0c515a feefeffe 00000100  
3fffff00:  74736574 3ffeef00 00000020 40100902
3fffff10:  402033a5 feefeffe feefeffe feefeffe  
3fffff20:  74736574 74736574 74736574 40203300
3fffff30:  3ffe863e 00000000 74002928 4020330d  
3fffff40:  007a1200 0696e6f1 ffffff00 3ffee3c4
3fffff50:  401050a1 00028e34 3ffee420 00000000  
3fffff60:  3ffedd00 3ffee420 00000181 00000002
3fffff70:  00000004 00000000 3ffee318 00000001  
3fffff80:  40202a55 000001f4 3ffee3c4 3ffee3c4
3fffff90:  3fffdad0 00000000 3ffee34c 4020106a
3fffffa0:  feefeffe feefeffe 3ffee384 40202560  
3fffffb0:  feefeffe feefeffe 3ffe84e4 40100bc5
<<<stack<<<

--------------- CUT HERE FOR EXCEPTION DECODER ---------------

I haven't found a way to decode the stacktrace using PlatformIO, sorry.

Using this works:

#include <Arduino.h>
#include <ESP8266WiFi.h>

void setup() {
  Serial.begin(115200);
  Serial.println("Before begin()");
  delay(500);
  //WiFi.begin("test","testtesttest");
  delay(500);
  Serial.println("After begin()");
}

void loop() {
  Serial.println(WiFi.status());
  Serial.println(WiFi.localIP());
  delay(500);
}

Output:

Before begin()
After begin()
0
(IP unset)
0
(IP unset)
0
(IP unset)

This is not the first time I encounter this issue... I rarely use WiFi.begin() in my code because all my ESPs are configured correctly for my wifi. But today I accidentally flashed code with WiFi.begin() and wrong credentials and now I'm unable to recover. I had the same issue few weeks ago and after hours of flashing different stuff using different software (NodeMCU flasher etc.) and different flash layouts it finally recovered, but I don't know what exactly helped.

I know that there are similar issues like #1997 but they are either old, closed or refer to much more complex code using WifiManager etc...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions