I'm doing a pixelstip with esp32 Display TTGO. I did one which work perfectly with 144 leds. Today, I'm doing the same thing with 644 leds.
I used the same code and just modify the NUMPIXELS (Global) variable from 144 to 644. At this moment the card crash. I try to use 143 or 145 and that crash. I've try some random values and that work sometimes.
I install ESP Exception Decoder and find the line which causes my trouble:
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
Start
chipid : 56403 - chiffre : 18 - soustrction : 1
T1: 0, T2: 0, T3: 0, T4: 0, T : 1095SD CARD : ok
test : ok
Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x4000c3f5 PS : 0x00060530 A0 : 0x800dbdab A1 : 0x3ffb1e80
A2 : 0x00000093 A3 : 0x3ffb1ef8 A4 : 0x00000006 A5 : 0x0000ff00
A6 : 0x00ff0000 A7 : 0xff000000 A8 : 0x00000000 A9 : 0x00000093
A10 : 0x00000064 A11 : 0x00000000 A12 : 0x00000006 A13 : 0xe881b485
A14 : 0x00000000 A15 : 0x3ffb8cb0 SAR : 0x00000018 EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000093 LBEG : 0x400014fd LEND : 0x4000150d LCOUNT : 0xffffffff
ELF file SHA256: 0000000000000000
Backtrace: 0x4000c3f5:0x3ffb1e80 0x400dbda8:0x3ffb1ea0 0x400dbecb:0x3ffb1ec0 0x400d4a14:0x3ffb1ee0 0x400d4dd6:0x3ffb1f40 0x400de18e:0x3ffb1fb0 0x400879be:0x3ffb1fd0
PC: 0x4000c3f5
EXCVADDR: 0x00000093
Decoding stack results
0x400dbda8: String::copy(char const*, unsigned int) at /home/vcxp/.arduino15/packages/esp32/hardware/esp32/1.0.6/cores/esp32/WString.cpp line 212
0x400dbecb: String::operator=(String const&) at /home/vcxp/.arduino15/packages/esp32/hardware/esp32/1.0.6/cores/esp32/WString.cpp line 263
0x400d4a14: getFile(fs::File) at /home/vcxp/Arduino/PixelTube_ESP32/PixelTube_ESP32.ino line 1194
0x400d4dd6: setup() at /home/vcxp/Arduino/PixelTube_ESP32/PixelTube_ESP32.ino line 309
0x400de18e: loopTask(void*) at /home/vcxp/.arduino15/packages/esp32/hardware/esp32/1.0.6/cores/esp32/main.cpp line 18
0x400879be: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 143`
Here is the GetFile function, Which read file on SDcard:
int getFile(File dir) {
int numTabs = 0;
String str;
while (true) {
File entry = dir.openNextFile();
if (! entry) {
// no more files
return numTabs;
}
if (!entry.isDirectory()) {
str = (String)entry.name();
str = str.substring(1, str.length() - 4);
nf[numTabs] = (str); //the crash line
numTabs++;
}
}
}
I've open Wstring.cpp to see if my global variable NUMPIXELS can interact and nothing.
I'm stuck! Is somebody has an explication?