Skip to content

Guru Meditation Error: Core 1 panic'ed (LoadProhibited) on Adafruit Huzzah ESP32 #1411

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kskiddy opened this issue May 16, 2018 · 13 comments
Closed

Comments

@kskiddy
Copy link

kskiddy commented May 16, 2018

Hardware:

Board: Adafruit Huzzah ESP32
Core Installation/update date: May 14 2018 (this is when I installed the board)
IDE name: Arduino IDE
Flash Frequency: 80Mhz
Upload Speed: 921600

Description:

I'm trying to connect to adafruit io and control an LED from the website. Doesn't work, and get Guru Meditation Error in serial monitor

Sketch:

// digital pin A5
#define LED_PIN A5

// set up the 'digital' feed
AdafruitIO_Feed *digital = io.feed("digital");

void setup() {

// set led pin as a digital output
pinMode(LED_PIN, OUTPUT);

// start the serial connection
Serial.begin(115200);

// wait for serial monitor to open
while(! Serial);

// connect to io.adafruit.com
Serial.print("Connecting to Adafruit IO");
io.connect();

// set up a message handler for the 'digital' feed.
// the handleMessage function (defined below)
// will be called whenever a message is
// received from adafruit io.
digital->onMessage(handleMessage);

// wait for a connection
while(io.status() < AIO_CONNECTED) {
Serial.print(".");
delay(500);
}

// we are connected
Serial.println();
Serial.println(io.statusText());
digital->get();

}

void loop() {

// io.run(); is required for all sketches.
// it should always be present at the top of your loop
// function. it keeps the client connected to
// io.adafruit.com, and processes any incoming data.
io.run();

}

// this function is called whenever an 'digital' feed message
// is received from Adafruit IO. it was attached to
// the 'digital' feed in the setup() function above.
void handleMessage(AdafruitIO_Data *data) {

Serial.print("received <- ");

if(data->toPinLevel() == HIGH)
Serial.println("HIGH");
else
Serial.println("LOW");

// write the current state to the led
digitalWrite(LED_PIN, data->toPinLevel());

}

Debug Messages:

Adafruit IO connected.
Guru Meditation Error: Core 1 panic'ed (LoadProhibited)
. Exception was unhandled.
Core 1 register dump:
PC : 0x400d2eaf PS : 0x00060630 A0 : 0x800d2510 A1 : 0x3ffd1ec0
A2 : 0xfefefefe A3 : 0x3f400020 A4 : 0x3ffc109c A5 : 0x00000003
A6 : 0x00000001 A7 : 0x00000000 A8 : 0x800d4690 A9 : 0x3ffd1ea0
A10 : 0x00000002 A11 : 0x3f401301 A12 : 0x00000002 A13 : 0x0000ff00
A14 : 0x00ff0000 A15 : 0xff000000 SAR : 0x00000020 EXCCAUSE: 0x0000001c
EXCVADDR: 0xfefeff06 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff

Backtrace: 0x400d2eaf:0x3ffd1ec0 0x400d250d:0x3ffd1ee0 0x400d1ed3:0x3ffd1f00 0x401317f3:0x3ffd1f20

Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:812
load:0x40078000,len:0
load:0x40078000,len:11572
entry 0x40078a5c
Connecting to Adafruit IOAdafruitIO::connect()
........
Adafruit IO connected.
Guru Meditation Error: Core 1 panic'ed (LoadProhibited)

Exception Decoder

PC: 0x400d2eaf: Adafruit_MQTT_Publish::publish(char const*) at C:\Users\Keith\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT.cpp line 797
EXCVADDR: 0xfefeff06

Decoding stack results
0x400d2eaf: Adafruit_MQTT_Publish::publish(char const*) at C:\Users\Keith\Documents\Arduino\libraries\Adafruit_MQTT_Library\Adafruit_MQTT.cpp line 797
0x400d250d: AdafruitIO_Feed::get() at C:\Users\Keith\Documents\Arduino\libraries\Adafruit_IO_Arduino\src\AdafruitIO_Feed.cpp line 128
0x400d1ed3: setup() at C:\Users\Keith\Documents\Arduino\adafruitio_07_digital_out_ESP32/adafruitio_07_digital_out_ESP32.ino line 59
0x401317f3: loopTask(void*) at C:\Users\Keith\Documents\Arduino\hardware\espressif\esp32\cores\esp32\main.cpp line 15

@lbernstone
Copy link
Contributor

Try another mqtt client. I'd recommend http://pubsubclient.knolleary.net . I know that one also works using WiFiClientSecure.

@lbernstone
Copy link
Contributor

Also, don't use the A5 syntax, espressif just uses GPIO pin numbers. A5 = 33 on most boards, which is an input pin. Use a pin <32 for outputs.

@lynxzp
Copy link
Contributor

lynxzp commented Jun 10, 2018

I have similar problem.
Board: ESP32-EVB rev D (I have two boards with same behavior)
Core Installation: few month ago.
Update date: today (same behavior with both versions)

pinMode(6,OUTPUT) reboot device.

Minimal sketch with this problem:

void setup() {
  Serial.begin(9600);
  Serial.print("\r\n start \r\n");
  delay(2000);
  pinMode(6,OUTPUT);
  Serial.print("\r\n === never heppen === \r\n");
}
void loop() {}

Debug Message:

start 

 === neverGuru Meditation Error: Core  1 panic'ed (IllegalInstruction)
. Exception was unhandled.
Core 1 register dump:
PC      : 0x400e55c4  PS      : 0x00060330  A0      : 0x00000000  A1      : 0x3ffca340  
A2      : 0x00000000  A3      : 0x00000000  A4      : 0x00000000  A5      : 0x00000000  
A6      : 0x00000000  A7      : 0x00000000  A8      : 0x800e349d  A9      : 0x3ffca320  
A10     : 0x3ffc2314  A11     : 0x00000000  A12     : 0x00060023  A13     : 0x3ffc67ac  
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x0000001a  EXCCAUSE: 0x00000000  
EXCVADDR: 0x00000000  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xfffffffc  

Backtrace: 0x400e55c4:0x3ffca340 0x7ffffffd:0x3ffca360

Rebooting...

Depends about around code I get IllegalInstruction or LoadProhibited.
It can be interesting: board reboot not immediately, some code always will be performed, in this case it was Serial.print("\r\n === never also It can be digitalWrite(6, HIGH); and it will work. Changing delay not change anything.

Another pins works good, but I don't have enough pins.

Also I found same issues: #1347 erase flash not helped for me.
#801 (similar problem with ESP32 rev0)
#641 (very very similar, not fixed)

@lynxzp
Copy link
Contributor

lynxzp commented Jun 10, 2018

As I understand this is analog of

//pinMode(4,OUTPUT);
//digitalWrite(4,HIGH);
REG_WRITE(GPIO_OUT_W1TS_REG,1<<4);
REG_WRITE(GPIO_ENABLE_W1TS_REG,1<<4);

It is work and not reboot. But

REG_WRITE(GPIO_OUT_W1TS_REG,1<<6);
REG_WRITE(GPIO_ENABLE_W1TS_REG,1<<6);

this don't have any effect. At least it not reboot board, but pin still not working.

Seems like it's not fully problem of Arduino core, but partially is it.

@stickbreaker
Copy link
Contributor

stickbreaker commented Jun 10, 2018

@lynxzp GPIO06 through GPIO11 are reserved for the FLASH. You cannot use them.

Chuck.

@stale
Copy link

stale bot commented Aug 1, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Status: Stale Issue is stale stage (outdated/stuck) label Aug 1, 2019
@kbickham
Copy link

kbickham commented Aug 15, 2019

[removed]

@stale stale bot removed the Status: Stale Issue is stale stage (outdated/stuck) label Aug 15, 2019
@stickbreaker
Copy link
Contributor

@kbickham Don't hijack a thread, open your own.

This thread is pin function problem. Are you trying to use pins dedicated for FLASH?

Chuck.

@kbickham
Copy link

@kbickham Don't hijack a thread, open your own.

This thread is pin function problem. Are you trying to use pins dedicated for FLASH?

Chuck.

for this same issue? Ok

@stickbreaker
Copy link
Contributor

So, your issue is using MQTT and reconfiguring a dedicated FLASH data pin? And you are Using a 2018 version of the core with an adafruit Huzza board?

@paynterf
Copy link
Contributor

I'm having a similar problem with a ESP32 Dev board trying to access a web site - not using any pins at all. Here's my code: If I comment out the 'client.print()' lines 'the code executes OK but of course I don't get anything back from the website. If either client.print() statement is uncommented, I get the 'Guru Meditation Error'

/*
 *  This sketch sends a message to a TCP server
 *
 */

#include <WiFi.h>
#include <WiFiMulti.h>

WiFiMulti WiFiMulti;

void setup()
{
    Serial.begin(115200);
    delay(10);
    Serial.println("Hello");

    // We start by connecting to a WiFi network
//    WiFiMulti.addAP("ARRIS-6089", "LaserJet4");
    WiFiMulti.addAP("HOME_1", "ThusAlways2Tyrants");

    Serial.println();
    Serial.println();
    Serial.print("Waiting for WiFi... ");

    while(WiFiMulti.run() != WL_CONNECTED) {
        Serial.print(".");
        delay(500);
    }

    Serial.println("");
    Serial.println("WiFi connected");
    Serial.println("IP address: ");
    Serial.println(WiFi.localIP());

    delay(500);
}


void loop()
{
    const uint16_t port = 1337;
    const char * host = "http://127.0.0.1"; // ip or dns

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

    // Use WiFiClient class to create TCP connections
    WiFiClient client;

    if (!client.connect(host, port)) {
        Serial.println("Connection failed.");
        Serial.println("Waiting 5 seconds before retrying...");
        delay(5000);
        return;
    }

    // This will send a request to the server
    //client.print("Send this data to the server");
    //client.print("GET /index.htm HTTP/1.1");
    client.println("GET ./170427E.html");

    //read back one line from the server
    String line = client.readStringUntil('\r');
//    client.println(line);
    Serial.println(line);

    //client.print("GET ./index.html HTTP/1.1");

    //read back one line from the server
    line = client.readStringUntil('\r');
//    client.println(line);
    Serial.println(line);

    Serial.println("Closing connection.");
    client.stop();

    Serial.println("Waiting 5 seconds before restarting...");
    delay(5000);
}

and the result in the serial monitor:

Hello


Waiting for WiFi... 
WiFi connected
IP address: 
192.168.1.71
Connecting to http://127.0.0.1
Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC      : 0x400d1b5c  PS      : 0x00060630  A0      : 0x800d1c30  A1      : 0x3ffb1ea0  
A2      : 0x00000000  A3      : 0x3ffb1eef  A4      : 0x00000001  A5      : 0x00000001  
A6      : 0x3ffc20b0  A7      : 0x00000001  A8      : 0x00000000  A9      : 0x00000000  
A10     : 0x00000000  A11     : 0x00000000  A12     : 0x00000050  A13     : 0x3ffba8da  
A14     : 0x00000000  A15     : 0x00000000  SAR     : 0x0000000a  EXCCAUSE: 0x0000001c  
EXCVADDR: 0x00000008  LBEG    : 0x4000c46c  LEND    : 0x4000c477  LCOUNT  : 0xffffffff  

Backtrace: 0x400d1b5c:0x3ffb1ea0 0x400d1c2d:0x3ffb1ec0 0x4013dbaa:0x3ffb1ee0 0x400d338d:0x3ffb1f10 0x400d33c1:0x3ffb1f30 0x400d188d:0x3ffb1f50 0x400d31e9:0x3ffb1fb0 0x4008877d:0x3ffb1fd0

@kbickham
Copy link

kbickham commented Aug 25, 2019 via email

@technorainbows
Copy link

technorainbows commented Sep 20, 2019

I had similar issues recently which I solved and explained elsewhere. Potentially helpful for you guys. I'd suggest double-checking that there is actually something to print from the client and seeing what is actually retrieved from the client, as maybe the error is due to trying to print out stuff that doesn't exist and/or there's a mismatch in what is expected versus exists in the buffer. You could test this out by disabling some code in the wificlient library and/or adding more debugging msgs there. See my post here for more info: #2977 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants