PlatformIO Community

ESP32, Arduino, Efuse, External Flash, SHA 256 error


I have used the tool to burn the efuses to the internal flash on the esp32 to the GPIOs:

(CLK) CLK - 14

(Q) D0 - 12

(D) D1 - 13

(CS0) CS - 5

I have then uploaded the blink sketch and it can run from these GPIOs to the external flash.

However when uploading more complicated sketches I get the error:

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 68473614, SPIWP:0xee
mode:DIO, clock div:2
entry 0x400806a8
Starting up
Guru Meditation Error: Core 1 panic’ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x40081005 PS : 0x00060530 A0 : 0x800d5759 A1 : 0x3ffb1ef0
A2 : 0x0000000c A3 : 0x00000002 A4 : 0x3ffb91f0 A5 : 0x00000000
A6 : 0x00000000 A7 : 0x3ffd4428 A8 : 0x3f4012c8 A9 : 0xaaaaaaaa
A10 : 0xaaaaaaaa A11 : 0x00000034 A12 : 0x00000000 A13 : 0x00000001
A14 : 0x00060520 A15 : 0x00000000 SAR : 0x0000001f EXCCAUSE: 0x0000001c
EXCVADDR: 0xaaaaaaaa LBEG : 0x400029ac LEND : 0x400029cb LCOUNT : 0x00000000

ELF file SHA256: 0000000000000000

Backtrace: 0x40081005:0x3ffb1ef0 0x400d5756:0x3ffb1f10 0x400d1b55:0x3ffb1f30 0x400d1c81:0x3ffb1f70 0x400d626e:0x3ffb1fb0 0x400864ca:0x3ffb1fd0

I have my partitions table in the platformini file set to default 16MB, same as the external chip being W25Q 16MB.

Any idea on why it can’t read from this external chip for neural network applications but can for a simple blink sketch?

Many thanks,


So, have you decoded the backtrace? This tells you where it crashes. Just add

build_type = debug
monitor_filters = esp32_exception_decoder

(docs, docs) to the platformio.ini, and do a “Upload & Monitor”. After the crash there should now be extra info.


Decoding the back trace reveals:

Backtrace: 0x40081005:0x3ffb1ef0 0x400d56f2:0x3ffb1f10 0x400d1b29:0x3ffb1f30 0x400d1c55:0x3ffb1f70 0x400d620a:0x3ffb1fb0 0x400864ca:0x3ffb1fd0
#0 0x40081005:0x3ffb1ef0 in __pinMode at /Users//.platformio/packages/framework-arduinoespressif32/cores/esp32/esp32-hal-gpio.c:115
#1 0x400d56f2:0x3ffb1f10 in ledcAttachPin at /Users/
#2 0x400d1b29:0x3ffb1f30 in CommandProcessor::CommandProcessor() at src/CommandProcessor.cpp:76
#3 0x400d1c55:0x3ffb1f70 in setup() at src/main.cpp:81 (discriminator 3)
#4 0x400d620a:0x3ffb1fb0 in loopTask(void*) at /Users/*****/.platformio/packages/framework-arduinoespressif32/cores/esp32/main.cpp:18
#5 0x400864ca:0x3ffb1fd0 in vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)

Not sure what this means I should change? Ive altered the hal-spi.c to the correct GPIOs.

Thank you!

Clicking on the particular elements reveals:

//RTC pins PULL settings
if(rtc_reg) {
    //lock rtc
    ESP_REG(rtc_reg) = ESP_REG(rtc_reg) & ~(rtc_gpio_desc[pin].mux);
    if(mode & PULLUP) {
        ESP_REG(rtc_reg) = (ESP_REG(rtc_reg) | rtc_gpio_desc[pin].pullup) & ~(rtc_gpio_desc[pin].pulldown);
    } else if(mode & PULLDOWN) {
        ESP_REG(rtc_reg) = (ESP_REG(rtc_reg) | rtc_gpio_desc[pin].pulldown) & ~(rtc_gpio_desc[pin].pullup);
    } else {
        ESP_REG(rtc_reg) = ESP_REG(rtc_reg) & ~(rtc_gpio_desc[pin].pullup | rtc_gpio_desc[pin].pulldown);
    //unlock rtc

Will look into it