ESP32 "Guru Meditation Error: Core 1 panic'ed (IllegalInstruction). Exception was unhandled."

Wesley.Lai
Posts: 5
Joined: Mon Sep 25, 2023 4:35 am

ESP32 "Guru Meditation Error: Core 1 panic'ed (IllegalInstruction). Exception was unhandled."

Postby Wesley.Lai » Mon Sep 25, 2023 6:18 am

I have a question about the operation of ESP32 after uploading code in the Arduino IDE environment.
This problem has been bothering me for several weeks.

Let me first describe my environment:
OS version: Windows 10 Pro 22H2 (19045.3324)
Arduino version: 1.8.13
Board Manager ESP32 version: 2.0.13 (by Espressif System)

The problem is described as follows:

This code was developed in 2021 using "DOIT ESP32 DEVKIT V1" and everything was working fine at that time.
Recently, I needed to copy a system and purchased two development boards "NodeMCU-32S" and "ESP32 DevKit V1" through the Internet for program upload.
After the upload was completed, I found through the Serial Monitor window that "the system booted repeatedly and continued to output register dumps" and the message "Guru Meditation Error: Core 1 Panic'ed (IllegalInstruction). Exception was unhandled" was displayed. Found in these messages.

The source code and the screenshots of Serial monitor output message are attached.

I would like to know:
1. What’s wrong with Code?
2. How should I deal with it?
Attachments
Screenshot 2023-09-25 135835.jpg
Screenshot 2023-09-25 135835.jpg (616.65 KiB) Viewed 5591 times
20220811_LED-JIG.zip
(2.13 KiB) Downloaded 269 times

lbernstone
Posts: 829
Joined: Mon Jul 22, 2019 3:20 pm

Re: ESP32 "Guru Meditation Error: Core 1 panic'ed (IllegalInstruction). Exception was unhandled."

Postby lbernstone » Tue Sep 26, 2023 1:46 am

You can debug the backtrace. https://github.com/espressif/arduino-es ... exceptions
If you roll back to the version of arduino-esp32 you originally programmed the code in, it is likely to work. You can see the branch dates at https://github.com/espressif/arduino-esp32/releases

markdh102
Posts: 11
Joined: Sat Apr 18, 2020 12:03 pm

Re: ESP32 "Guru Meditation Error: Core 1 panic'ed (IllegalInstruction). Exception was unhandled."

Postby markdh102 » Tue Sep 26, 2023 6:23 am

Try adding a dummy return value to following function in IS31FL3733.cpp or better yet, make it a void :

uint8_t IS31FL3733::set_page(uint8_t page)
{
write_reg(0xFE, 0xC5);
write_reg(0xFD, page);
}

I had this exact same problem after moving to 2.0.11 ESP32 Arduino.

See https://esp32.com/viewtopic.php?f=19&t=35952

Wesley.Lai
Posts: 5
Joined: Mon Sep 25, 2023 4:35 am

Re: ESP32 "Guru Meditation Error: Core 1 panic'ed (IllegalInstruction). Exception was unhandled."

Postby Wesley.Lai » Tue Sep 26, 2023 7:48 am

lbernstone wrote:
Tue Sep 26, 2023 1:46 am
You can debug the backtrace. https://github.com/espressif/arduino-es ... exceptions
If you roll back to the version of arduino-esp32 you originally programmed the code in, it is likely to work. You can see the branch dates at https://github.com/espressif/arduino-esp32/releases
Thank you for your information.
I will try this again.

But I tested the LED flashing on the development board in the same development environment and it is normal.
So this has always puzzled me.

I will try your opinion, thank you!

Wesley.Lai
Posts: 5
Joined: Mon Sep 25, 2023 4:35 am

Re: ESP32 "Guru Meditation Error: Core 1 panic'ed (IllegalInstruction). Exception was unhandled."

Postby Wesley.Lai » Tue Sep 26, 2023 7:50 am

markdh102 wrote:
Tue Sep 26, 2023 6:23 am
Try adding a dummy return value to following function in IS31FL3733.cpp or better yet, make it a void :

uint8_t IS31FL3733::set_page(uint8_t page)
{
write_reg(0xFE, 0xC5);
write_reg(0xFD, page);
}

I had this exact same problem after moving to 2.0.11 ESP32 Arduino.

See https://esp32.com/viewtopic.php?f=19&t=35952
Thanks for the suggestion, I will try it, thank you!

Wesley.Lai
Posts: 5
Joined: Mon Sep 25, 2023 4:35 am

Re: ESP32 "Guru Meditation Error: Core 1 panic'ed (IllegalInstruction). Exception was unhandled."

Postby Wesley.Lai » Mon Oct 02, 2023 2:18 am

lbernstone wrote:
Tue Sep 26, 2023 1:46 am
You can debug the backtrace. https://github.com/espressif/arduino-es ... exceptions
If you roll back to the version of arduino-esp32 you originally programmed the code in, it is likely to work. You can see the branch dates at https://github.com/espressif/arduino-esp32/releases
After several days of testing, the same message appears no matter which version is used.

Wesley.Lai
Posts: 5
Joined: Mon Sep 25, 2023 4:35 am

Re: ESP32 "Guru Meditation Error: Core 1 panic'ed (IllegalInstruction). Exception was unhandled."

Postby Wesley.Lai » Mon Oct 02, 2023 2:25 am

markdh102 wrote:
Tue Sep 26, 2023 6:23 am
Try adding a dummy return value to following function in IS31FL3733.cpp or better yet, make it a void :

uint8_t IS31FL3733::set_page(uint8_t page)
{
write_reg(0xFE, 0xC5);
write_reg(0xFD, page);
}

I had this exact same problem after moving to 2.0.11 ESP32 Arduino.

See https://esp32.com/viewtopic.php?f=19&t=35952
Sorry, I've been thinking about your suggestions these days, but I don't know what code to add to IS31FL3733.cpp so that it will return dummy values. Can you give me some suggestions?

markdh102
Posts: 11
Joined: Sat Apr 18, 2020 12:03 pm

Re: ESP32 "Guru Meditation Error: Core 1 panic'ed (IllegalInstruction). Exception was unhandled."

Postby markdh102 » Mon Oct 02, 2023 10:58 am

In the .cpp file change

Code: Select all

uint8_t IS31FL3733::set_page(uint8_t page)
to

Code: Select all

void IS31FL3733::set_page(uint8_t page)
In the .h file change

Code: Select all

uint8_t set_page(uint8_t page);
to

Code: Select all

void set_page(uint8_t page);

Who is online

Users browsing this forum: No registered users and 54 guests