Core 1 panic'ed, ESP32 read from SPIFFS

Alex_cv
Posts: 2
Joined: Mon Mar 23, 2020 1:11 pm

Core 1 panic'ed, ESP32 read from SPIFFS

Postby Alex_cv » Sun Feb 13, 2022 3:54 pm

Hello, I need help, the code compiles but there is a problem when executing.
The problem appeared after the matrix was enlarged.
The program reads the file from SPIFFS, converts according to the matrix and outputs to 2 pins.


Please help me, thank you

Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled.

Core 1 register dump:
PC : 0x400d1552 PS : 0x00060f30 A0 : 0x800d165a A1 : 0x3ffb1000
A2 : 0x00025560 A3 : 0x00025560 A4 : 0x3ffc1b64 A5 : 0x3f408c78
A6 : 0x00000000 A7 : 0x3ffc112c A8 : 0x3ffb1a20 A9 : 0xfff06358
A10 : 0x3ffb27a4 A11 : 0x00000011 A12 : 0x3ffc112c A13 : 0x3ffb27a0
A14 : 0x0000033c A15 : 0x0000035f SAR : 0x00000018 EXCCAUSE: 0x0000001d
EXCVADDR: 0xfff06358 LBEG : 0x400859f0 LEND : 0x40085a06 LCOUNT : 0x00000000


Backtrace:0x400d154f:0x3ffb10000x400d1657:0x3ffb27c0 0x400d3599:0x3ffb2820




Code: Select all

#include <FastLED.h>
#include <SPI.h>
#include "SPIFFS.h"
//#include "FS.h"

bool En_EFF;
String Jinx_file;
#define CMD_NEW_DATA 1


#define NUM_LEDS 864 // LED number
#define DATA_PIN 2 // your data arduino pin
#define CHIPSET WS2811 // your LED chip type


#define COLOR_ORDER GRB
#define BRIGHTNESS 50

int count_files = 1; // Количество файлов

File fxdata;
CRGB leds[NUM_LEDS];

int val;
void setup()
{
  Serial.begin(115200);
  FastLED.addLeds<WS2811, 2, GRB>(leds, NUM_LEDS)/*.setCorrection( TypicalLEDStrip */;
  FastLED.setBrightness(BRIGHTNESS);

  for (int y = 0 ; y < NUM_LEDS ; y++)
  {
    leds[y] = CRGB::Black; // set all leds to black during setup
  }
  FastLED.show();
  SPIFFS.begin();
  Serial.println("START");
}

void loop()
{
  En_EFF = !(0);
  Jinx_file = String("/1.out");
  if (En_EFF) {
    Serial.println("Read...");
    String filename =  Jinx_file ;
    if (SPIFFS.exists(filename)) // проверка есть ли файл
    {
      Serial.println("File exists");
      fxdata = SPIFFS.open( Jinx_file , "r");
      if (fxdata) // проверка открылся ли файл
      {
        Serial.println("File open");
      }
      else Serial.println("File not open");
    }
    else Serial.println("NOT file");

    while (fxdata.available())
    {
      Sortled();
      FastLED.show();
      delay(50); // set the speed of the animation. 20 is appx ~ 500k bauds
    }
    fxdata.close();
  }
}
int Sortled () {

  CRGB templeds[NUM_LEDS];
  const uint32_t XYTable[] = {
    17,  18,  53,  54,  89,  90, 125, 126, 161, 162, 197, 198, 233, 234, 269, 270, 305, 306, 341, 342, 377, 378, 413, 414, 449, 450, 485, 486, 521, 522, 557, 558, 593, 594, 629, 630, 665, 666, 701, 702, 737, 738, 773, 774, 809, 810, 845, 846,
    16,  19,  52,  55,  88,  91, 124, 127, 160, 163, 196, 199, 232, 235, 268, 271, 304, 307, 340, 343, 376, 379, 412, 415, 448, 451, 484, 487, 520, 523, 556, 559, 592, 595, 628, 631, 664, 667, 700, 703, 736, 739, 772, 775, 808, 811, 844, 847,
    15,  20,  51,  56,  87,  92, 123, 128, 159, 164, 195, 200, 231, 236, 267, 272, 303, 308, 339, 344, 375, 380, 411, 416, 447, 452, 483, 488, 519, 524, 555, 560, 591, 596, 627, 632, 663, 668, 699, 704, 735, 740, 771, 776, 807, 812, 843, 848,
    14,  21,  50,  57,  86,  93, 122, 129, 158, 165, 194, 201, 230, 237, 266, 273, 302, 309, 338, 345, 374, 381, 410, 417, 446, 453, 482, 489, 518, 525, 554, 561, 590, 597, 626, 633, 662, 669, 698, 705, 734, 741, 770, 777, 806, 813, 842, 849,
    13,  22,  49,  58,  85,  94, 121, 130, 157, 166, 193, 202, 229, 238, 265, 274, 301, 310, 337, 346, 373, 382, 409, 418, 445, 454, 481, 490, 517, 526, 553, 562, 589, 598, 625, 634, 661, 670, 697, 706, 733, 742, 769, 778, 805, 814, 841, 850,
    12,  23,  48,  59,  84,  95, 120, 131, 156, 167, 192, 203, 228, 239, 264, 275, 300, 311, 336, 347, 372, 383, 408, 419, 444, 455, 480, 491, 516, 527, 552, 563, 588, 599, 624, 635, 660, 671, 696, 707, 732, 743, 768, 779, 804, 815, 840, 851,
    11,  24,  47,  60,  83,  96, 119, 132, 155, 168, 191, 204, 227, 240, 263, 276, 299, 312, 335, 348, 371, 384, 407, 420, 443, 456, 479, 492, 515, 528, 551, 564, 587, 600, 623, 636, 659, 672, 695, 708, 731, 744, 767, 780, 803, 816, 839, 852,
    10,  25,  46,  61,  82,  97, 118, 133, 154, 169, 190, 205, 226, 241, 262, 277, 298, 313, 334, 349, 370, 385, 406, 421, 442, 457, 478, 493, 514, 529, 550, 565, 586, 601, 622, 637, 658, 673, 694, 709, 730, 745, 766, 781, 802, 817, 838, 853,
    9,  26,  45,  62,  81,  98, 117, 134, 153, 170, 189, 206, 225, 242, 261, 278, 297, 314, 333, 350, 369, 386, 405, 422, 441, 458, 477, 494, 513, 530, 549, 566, 585, 602, 621, 638, 657, 674, 693, 710, 729, 746, 765, 782, 801, 818, 837, 854,
    8,  27,  44,  63,  80,  99, 116, 135, 152, 171, 188, 207, 224, 243, 260, 279, 296, 315, 332, 351, 368, 387, 404, 423, 440, 459, 476, 495, 512, 531, 548, 567, 584, 603, 620, 639, 656, 675, 692, 711, 728, 747, 764, 783, 800, 819, 836, 855,
    7,  28,  43,  64,  79, 100, 115, 136, 151, 172, 187, 208, 223, 244, 259, 280, 295, 316, 331, 352, 367, 388, 403, 424, 439, 460, 475, 496, 511, 532, 547, 568, 583, 604, 619, 640, 655, 676, 691, 712, 727, 748, 763, 784, 799, 820, 835, 856,
    6,  29,  42,  65,  78, 101, 114, 137, 150, 173, 186, 209, 222, 245, 258, 281, 294, 317, 330, 353, 366, 389, 402, 425, 438, 461, 474, 497, 510, 533, 546, 569, 582, 605, 618, 641, 654, 677, 690, 713, 726, 749, 762, 785, 798, 821, 834, 857,
    5,  30,  41,  66,  77, 102, 113, 138, 149, 174, 185, 210, 221, 246, 257, 282, 293, 318, 329, 354, 365, 390, 401, 426, 437, 462, 473, 498, 509, 534, 545, 570, 581, 606, 617, 642, 653, 678, 689, 714, 725, 750, 761, 786, 797, 822, 833, 858,
    4,  31,  40,  67,  76, 103, 112, 139, 148, 175, 184, 211, 220, 247, 256, 283, 292, 319, 328, 355, 364, 391, 400, 427, 436, 463, 472, 499, 508, 535, 544, 571, 580, 607, 616, 643, 652, 679, 688, 715, 724, 751, 760, 787, 796, 823, 832, 859,
    3,  32,  39,  68,  75, 104, 111, 140, 147, 176, 183, 212, 219, 248, 255, 284, 291, 320, 327, 356, 363, 392, 399, 428, 435, 464, 471, 500, 507, 536, 543, 572, 579, 608, 615, 644, 651, 680, 687, 716, 723, 752, 759, 788, 795, 824, 831, 860,
    2,  33,  38,  69,  74, 105, 110, 141, 146, 177, 182, 213, 218, 249, 254, 285, 290, 321, 326, 357, 362, 393, 398, 429, 434, 465, 470, 501, 506, 537, 542, 573, 578, 609, 614, 645, 650, 681, 686, 717, 722, 753, 758, 789, 794, 825, 830, 861,
    1,  34,  37,  70,  73, 106, 109, 142, 145, 178, 181, 214, 217, 250, 253, 286, 289, 322, 325, 358, 361, 394, 397, 430, 433, 466, 469, 502, 505, 538, 541, 574, 577, 610, 613, 646, 649, 682, 685, 718, 721, 754, 757, 790, 793, 826, 829, 862,
    0,  35,  36,  71,  72, 107, 108, 143, 144, 179, 180, 215, 216, 251, 252, 287, 288, 323, 324, 359, 360, 395, 396, 431, 432, 467, 468, 503, 504, 539, 540, 575, 576, 611, 612, 647, 648, 683, 684, 719, 720, 755, 756, 791, 792, 827, 828, 863
  };
  fxdata.readBytes((char*)templeds, NUM_LEDS * 3);
  for (int k = 0; k < NUM_LEDS; k++) {
    leds[XYTable[k]] = templeds[k];
  }
}

ESP_Sprite
Posts: 9730
Joined: Thu Nov 26, 2015 4:08 am

Re: Core 1 panic'ed, ESP32 read from SPIFFS

Postby ESP_Sprite » Mon Feb 14, 2022 1:50 am

Can you decode that backtrace?

Who is online

Users browsing this forum: No registered users and 53 guests