SOLVED [There was a speaker and PNP Transistor on it, I removed it, works]
For some reason I keep on taking out the problem code and it just hangs up on the next line, on and on. Is it possible there is H/W damage to ESP32?
I say it's likely as I kind of spit this together and it's inside a friggin pumpkin.
Dump:
Guru Meditation Error: Core 1 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x400d20a8: ffffffff ffffffff ffffffff
Core 1 register dump:
PC : 0x400d20ac PS : 0x00060330 A0 : 0x800d4e8a A1 : 0x3ffb1f40
A2 : 0x00000000 A3 : 0x40b38800 A4 : 0x3ffc1c50 A5 : 0x3ffbec04
A6 : 0x00000008 A7 : 0x00000001 A8 : 0x800d10bd A9 : 0x3ffb1f20
A10 : 0x00000001 A11 : 0x00000006 A12 : 0x00000003 A13 : 0x00000003
A14 : 0x3ff59000 A15 : 0x00000078 SAR : 0x00000009 EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x400029ac LEND : 0x400029cb LCOUNT : 0x00000000
Backtrace: 0x400d20ac:0x3ffb1f40 0x400d4e87:0x3ffb1fb0 0x40088a19:0x3ffb1fd0
Decodes to:
PC: 0x400d4174: HardwareSerial::begin(unsigned long, unsigned int, signed char, signed char, bool, unsigned long) at C:\Users\matt\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32\HardwareSerial.cpp line 34
EXCVADDR: 0x00000000
Decoding stack results
0x400d4174: HardwareSerial::begin(unsigned long, unsigned int, signed char, signed char, bool, unsigned long) at C:\Users\matt\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32\HardwareSerial.cpp line 34
0x400d5bfb: loopTask(void*) at C:\Users\matt\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.4\cores\esp32\main.cpp line 14
0x40088b7d: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 143
MY STUPID SKETCH...
#include <WiFi.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
//ALL
#define TMIN 25
#define TMAX 250
#define FLASHMS 200
#define DELAY1 5200
#define DELAY2 1200
//Random Multiplier / 1000
#define FMIN 400
#definTRUNCATED
}
I want my jackolantern lit! Still crashes.. but BasicOTA won't crash....
I worked up from basicOTA and put in the global declares... OKAY. But when I put in the setup() fxn, that crashed on ledcsetup, I commented all but the first ledcsetup and now it's crashing in another address...
My code is it is being uploaded:
#include <WiFi.h>
#include <WiFiUdp.h>
#include <ArduinoOTA.h>
//ALL
#define TMIN 25
#define TMAX 250
#define FLASHMS 200
#define DELAY1 5200
#define DELAY2 1200
//Random Multiplier / 1000
#define FMIN 400
#define FMAX 650
//Red
#define RA 33
#define RB 25
#define R1 0
#define R2 1
//Yellow
#define YA 32
#define YB 33
#define Y1 2
#define Y2 3
//Orange
#define OA 27
#define OB 14
#define O1 4
#define O2 5
unsigned int lastLevel[7] = { 0, 0, 0, 0, 0, 0, 0 };
unsigned long nextChange[7] = { 1000, 2000, 3000, 4000, 5000, 6000 };
unsigned long lngnextChange;
unsigned int state[7] = { 0, 0, 0, 0, 0, 0 };
unsigned int lede[7] = { RA, RB, OA, OB, YA, YB };
unsigned int maxLevel[7] { 64, 64, 64, 64, 255, 255 };
String ledS[7] = { "RED A", "RED B", "Orange A", "Orange B", "Yellow A", "Yellow B" };
long unsigned msWas;
void setup() {
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
while (WiFi.waitForConnectResult() != WL_CONNECTED) {
// Serial.println("Connection Failed! Rebooting...");
delay(5000);
ESP.restart();
}
// Port defaults to 3232
// ArduinoOTA.setPort(3232);
// Hostname defaults to esp3232-[MAC]
ArduinoOTA.setHostname("Candle II");
// No authentication by default
// ArduinoOTA.setPassword("admin");
// Password can be set with it's md5 value as well
// MD5(admin) = 21232f297a57a5a743894a0e4a801fc3
// ArduinoOTA.setPasswordHash("21232f297a57a5a743894a0e4a801fc3");
ArduinoOTA
.onStart([]() {
String type;
if (ArduinoOTA.getCommand() == U_FLASH)
type = "sketch";
else // U_SPIFFS
type = "filesystem";
// NOTE: if updating SPIFFS this would be the place to unmount SPIFFS using SPIFFS.end()
// Serial.println("Start updating " + type);
})
.onEnd([]() {
})
.onProgress([](unsigned int progress, unsigned int total) {
})
.onError([](ota_error_t error) {
});
ArduinoOTA.begin();
for (int i = 0; i < 6; i++) {
pinMode(lede[i], OUTPUT);
}
pinMode(23, OUTPUT);
ledcSetup(0, 5000, 8);
// ledcSetup(1, 5000, 8);
// ledcSetup(2, 5000, 8);
//ledcSetup(3, 5000, 8);
//ledcSetup(4, 5000, 8);
//ledcSetup(5, 5000, 8);
ledcAttachPin(RA, 0);
ledcAttachPin(RB, 1);
ledcAttachPin(OA, 2);
ledcAttachPin(OB, 3);
ledcAttachPin(YA, 4);
ledcAttachPin(YB, 5);
}
void loop() {
ArduinoOTA.handle();
digitalWrite(14, HIGH);
}
The crash dump
Guru Meditation Error: Core 0 panic'ed (IllegalInstruction). Exception was unhandled.
Memory dump at 0x400d65a0: 2888082d 1ffe5856 ffffffff
Core 0 register dump:
PC : 0x400d65a7 PS : 0x00060d33 A0 : 0x800d6a46 A1 : 0x3ffbbfa0
A2 : 0x3ffbd2bc A3 : 0x3ffbbfcf A4 : 0x00000001 A5 : 0x00000001
A6 : 0x00060d20 A7 : 0x00000000 A8 : 0x00000000 A9 : 0x3ffbc0e8
A10 : 0x3ffbc0e8 A11 : 0x00060d23 A12 : 0x00060d23 A13 : 0x00000020
A14 : 0x00000020 A15 : 0x3ffcdecc SAR : 0x00000000 EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
Backtrace: 0x400d65a7:0x3ffbbfa0 0x400d6a43:0x3ffbbfc0 0x400d6a7b:0x3ffbbff0 0x400d7a25:0x3ffbc010 0x4008a1fd:0x3ffbc030 0x40088a19:0x3ffbc050
Decoded as...
PC: 0x400d65a7: find_task_in_twdt_list at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/task_wdt.c line 103
EXCVADDR: 0x00000000
Decoding stack results
0x400d65a7: find_task_in_twdt_list at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/task_wdt.c line 103
0x400d6a43: esp_task_wdt_reset at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/task_wdt.c line 313
0x400d6a7b: idle_hook_cb at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/task_wdt.c line 80
0x400d7a25: esp_vApplicationIdleHook at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/freertos_hooks.c line 51
0x4008a1fd: prvIdleTask at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/tasks.c line 3382
0x40088a19: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 143