Cant Access EEPROM over WIFI Handler

maxbayne
Posts: 1
Joined: Fri May 31, 2019 9:53 am

Cant Access EEPROM over WIFI Handler

Postby maxbayne » Fri May 31, 2019 10:15 am

hello to every body

i have ESP32 - WROOM

i use it as web server

it run perfect as server but when i try to access EEPROM to write some value in it the system crash

i define server settings as it

Code: Select all

#include <WiFiClient.h>
#include <ESP32WebServer.h>
#include <WiFi.h>            
#include <ESPmDNS.h>     

ESP32WebServer server(80);

void setup()
{
Serial.begin(115200);
EEPROM.begin(1024);

Serial.println();
    Serial.print("Connecting to ");
    Serial.println("myrouterSSID");

    //Try To Connect to Wifi
    WiFi.begin("myrouterSSID", "myRouterPSW");

    //Loop until Connecting To Wifi Network
    while (WiFi.status() != WL_CONNECTED)
    {
      delay(500);
      Serial.print(".");
    }

    //when connecting to wifi network successfully
    if (WiFi.status() == WL_CONNECTED)
    {
      Serial.println("");
      Serial.println("WiFi connected.");
      Serial.println("IP address: ");
      Serial.println(WiFi.localIP());
    }

    //try to register dns for this node
    while (!MDNS.begin("esp32"))
    {
      Serial.println("Error on Setting up MDNS");
      delay(1);
    }

    //register http request events ----------

   //GET: http://192.168.1.120/set/timer?duration=5000
    server.on("/set/timer", []() 
    {

      int duration = atoi(server.arg(0).c_str());

      EEPROM.writeInt(100, duration);
      EEPROM.commit();

      server.send(200, "text/plain", "Done");
    });


     server.begin();

    Serial.println("HTTP Server Started : ");
    Serial.print(secure.Dns);
    Serial.println("----------------------------");
    Serial.println("");

}

void Loop()
{
server.handleClient();
}
when i try to make http request from browser as GET
http://192.168.1.120/set/timer?duration=5000

i got this error (i use visual studio code with PlatfromIO)

Code: Select all

Guru Meditation Error: Core  1 panic'ed (Cache disabled but cached memory region accessed)
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x40150064: bad00bad bad00bad bad00bad
Guru Meditation Error: Core  1 panic'ed (IlleGuru Meditation Error: Core  1 panic'ed (Unhandled debug exception)
Debug exception reason: Stack canary watchpoint triggered ()
Guru Meditation Error: Core  1 panic'ed (Guru Meditation Error: Core  1 panic'ed (Double exception)
Guru Meditation Error: Core  1 panic'ed (Double exception)
how can i fix this error ?

Who is online

Users browsing this forum: No registered users and 2 guests