stangreg / Ignitron

An ESP32 based foot pedal to control the Spark Amp and connect to the App using Bluetooth LE.
BSD 3-Clause "New" or "Revised" License
35 stars 11 forks source link

Rebooting in a Loop #18

Closed DeadLED66 closed 1 year ago

DeadLED66 commented 1 year ago

Hi,

I've worked through a few of the issues that others have had, and I've gotten the firmware uploaded to the ESP-Wroom 32. Now it's in a loop of constantly restarting. I've tried redefining the preset button 2 as per one of the other issues. The serial out log is: `Rebooting... ets Jul 29 2019 12:21:46

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:1216 ho 0 tail 12 room 4 load:0x40078000,len:10944 load:0x40080400,len:6388 entry 0x400806b4 E (16) psram: PSRAM ID read error: 0xffffffff Initializing Initial button setup Operation mode: 1 ======= Entering APP mode ======= Trying to read file list Last bank not full, filling with last preset to get bank complete Last bank not full, filling with last preset to get bank complete Last bank not full, filling with last preset to get bank complete Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled. Core 1 register dump: PC : 0x401d5dff PS : 0x00060530 A0 : 0x800d35f3 A1 : 0x3ffca970
A2 : 0x00000000 A3 : 0x3ffbf0dc A4 : 0x3ffc69a0 A5 : 0x00000000
A6 : 0x00000013 A7 : 0x4501fba8 A8 : 0x3ffc5090 A9 : 0x3ffca980
A10 : 0x00000001 A11 : 0x000006f5 A12 : 0x00000001 A13 : 0x00000001
A14 : 0x00060520 A15 : 0x00000000 SAR : 0x00000008 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000014 LBEG : 0x40093ae1 LEND : 0x40093af1 LCOUNT : 0xffffffff

ELF file SHA256: 0000000000000000

Backtrace: 0x401d5dff:0x3ffca970 0x400d35f0:0x3ffca990 0x400d5e2a:0x3ffca9e0 0x400d21ee:0x3ffcacd0 0x4010760a:0x3ffcad10 0x400959a2:0x3ffcad30

Rebooting...`

And so on...

Any help would be appreciated. Thanks

ServError commented 1 year ago

What are you using to build the firmware (presumably, which arduino IDE version). Have you tried doing the initial flash with the Erase All Flash option enabled? Did you upload the contents of the data folder per the final paragraph of the Software page?

stangreg commented 1 year ago

Thanks for your issue report. Do you have the possibility to decode the backtrace? There are tools available to decode the stack trace. Note that the one for Arduino IDE is only compatible with pre-2.0 versions. This could help with the analysis. How much memory does your board have? Just a short in the dark, have you tried removing the majority of the JSON files in the data folder and adjusting the PresetList.txt file accordingly? Please remember to re-upload the file system afterwards.

stangreg commented 1 year ago

Addition: I just saw the following line during boot:

E (16) psram: PSRAM ID read error: 0xffffffff

Not sure if that is related to the issue, but it seems to be an error during initialization, before the code kicks in.

DeadLED66 commented 1 year ago

Hi, I'm using Arduino 1.8 to build, I've also done the upload of the data folder. I did not try the Erase all option though,I've looked for it and didn't see it.

The actual board I have is a ESP WROOM 32 with 38 pins so I'm not sure what is the correct board to use. As per the readme I've set I've the board to ESP32 Node32s (before it was ESP32 Dev module). And using the minimal spiffs partition scheme. This is the serial out:

Rebooting... ets Jul 29 2019 12:21:46

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:1044 load:0x40078000,len:10124 load:0x40080400,len:5856 entry 0x400806a8 Initializing Initial button setup Operation mode: 1 ======= Entering APP mode ======= Trying to read file list Last bank not full, filling with last preset to get bank complete Last bank not full, filling with last preset to get bank complete Last bank not full, filling with last preset to get bank complete Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled. Core 1 register dump: PC : 0x401cf0eb PS : 0x00060530 A0 : 0x800d35b3 A1 : 0x3ffca380
A2 : 0x00000000 A3 : 0x3ffbf0d4 A4 : 0x3ffc63fc A5 : 0x00000000
A6 : 0x00000013 A7 : 0x4501fba8 A8 : 0x3ffc4af0 A9 : 0x3ffca390
A10 : 0x00000001 A11 : 0x00000704 A12 : 0x00000001 A13 : 0x00000001
A14 : 0x00060520 A15 : 0x00000000 SAR : 0x00000008 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000014 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff

ELF file SHA256: 0000000000000000

Backtrace: 0x401cf0eb:0x3ffca380 0x400d35b0:0x3ffca3a0 0x400d5c86:0x3ffca3f0 0x400d22ba:0x3ffca6e0 0x4010429a:0x3ffca720 0x40090aa6:0x3ffca740

Rebooting...

So now the PSRAM read error is gone. So that's progress.

Here is the results from the exception decoder:

`PC: 0x401cf0eb: NimBLEServer::getConnectedCount() at C:\Users\tfria\OneDrive\Documents\Arduino\libraries\NimBLE-Arduino\src\NimBLEServer.cpp line 271 EXCVADDR: 0x00000014

Decoding stack results 0x401cf0eb: NimBLEServer::getConnectedCount() at C:\Users\tfria\OneDrive\Documents\Arduino\libraries\NimBLE-Arduino\src\NimBLEServer.cpp line 271 0x400d35b0: SparkBLEKeyboard::end() at C:\Todd\ELECTRONICS\KICAD\guitartfootswitch\Ignitron-main\Ignitron-main\Ignitron\src/SparkBLEKeyboard.cpp line 21 0x400d5c86: SparkDataControl::init(int) at C:\Todd\ELECTRONICS\KICAD\guitartfootswitch\Ignitron-main\Ignitron-main\Ignitron\src/SparkDataControl.cpp line 58 0x400d22ba: setup() at C:\Todd\ELECTRONICS\KICAD\guitartfootswitch\Ignitron-main\Ignitron-main\Ignitron/Ignitron.ino line 57 0x4010429a: loopTask(void*) at C:\Users\tfria\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.5\cores\esp32\main.cpp line 32 0x40090aa6: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 143`

DeadLED66 commented 1 year ago

Screen shot of exception: image

DeadLED66 commented 1 year ago

Update on this... I switched to using PlatformIO instead of Arduino IDE and this problem has gone away. It must be using a different version of the compiler or something.

stangreg commented 1 year ago

Nice to hear that it works now!