For some time I've been trying to solve this problem and I can't, the fact is. I have an esp32 saving settings, and it gets an ISR from LoRa. Despite semaphoro deals, apparently, the act of happening the ISR while manipulating the flash is a problem.
Any suggestion?
PC: 0x40008150
EXCVADDR: 0x00000000
Decoding stack results
0x40081321: RH_RF95::handleInterrupt() at /home/perotto/Arduino/libraries/RadioHead/RH_RF95.cpp line 347
0x4008142a: RH_RF95::isr0() at /home/perotto/Arduino/libraries/RadioHead/RH_RF95.cpp line 359
0x40081495: __onPinInterrupt at /home/perotto/.arduino15/packages/esp32/hardware/esp32/1.0.4/cores/esp32/esp32-hal-gpio.c line 220
0x40094097: esp_rom_spiflash_read_status at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/spi_flash/spi_flash_rom_patch.c line 261
0x400940ce: esp_rom_spiflash_wait_idle at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/spi_flash/spi_flash_rom_patch.c line 35
0x4009416d: esp_rom_spiflash_erase_sector_internal at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/spi_flash/spi_flash_rom_patch.c line 121
0x40094602: esp_rom_spiflash_erase_sector at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/spi_flash/spi_flash_rom_patch.c line 451
0x40087f89: spi_flash_erase_range at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/spi_flash/flash_ops.c line 237
0x40162a2e: esp_partition_erase_range at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/spi_flash/partition.c line 294
0x4010371b: spiffs_api_erase at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/spiffs/spiffs_api.c line 58
0x40104fde: spiffs_erase_block at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/spiffs/spiffs/src/spiffs_nucleus.c line 236
0x40103b39: spiffs_gc_erase_block at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/spiffs/spiffs/src/spiffs_gc.c line 15
0x4010467a: spiffs_gc_check at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/spiffs/spiffs/src/spiffs_gc.c line 168
0x40106a6e: spiffs_object_truncate at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/spiffs/spiffs/src/spiffs_nucleus.c line 1736
0x40102d6a: SPIFFS_open at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/spiffs/spiffs/src/spiffs_hydrogen.c line 275
0x4010211a: vfs_spiffs_open at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/spiffs/esp_spiffs.c line 451
0x401307ee: esp_vfs_open at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/vfs/vfs.c line 388
0x4013313a: _fopen_r at ../../../.././newlib/libc/stdio/fopen.c line 141
0x401331c9: fopen at ../../../.././newlib/libc/stdio/fopen.c line 181
0x400e70ea: VFSFileImpl::VFSFileImpl(VFSImpl*, char const*, char const*) at /home/perotto/.arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/FS/src/vfs_api.cpp line 263
0x400e741f: std::__shared_ptr ::__shared_ptr , VFSImpl*&, char const*, char const*&>(std::_Sp_make_shared_tag, std::allocator const&, VFSImpl*&, char const*&&, char const*&) at /home/perotto/.arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/ext/new_allocator.h line 120
0x400e76ad: VFSImpl::open(char const*, char const*) at /home/perotto/.arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/xtensa-esp32-elf/include/c++/5.2.0/bits/shared_ptr.h line 319
0x400e6d74: fs::FS::open(char const*, char const*) at /home/perotto/.arduino15/packages/esp32/hardware/esp32/1.0.4/libraries/FS/src/FS.cpp line 191
0x400da562: writeFile(fs::FS&, char const*, char const*, unsigned short) at /home/perotto/Documentos/GitHub/STU-MB/fileSystem.ino line 128
0x400dd965: saveConfig (fs::FS&, char const*, CF_STU_4s*) at /home/perotto/Documentos/GitHub/STU-MB/setupSystem.ino line 445
0x400de0cb: saveAllConfig() at /home/perotto/Documentos/GitHub/STU-MB/setupSystem.ino line 113
0x400de37b: receiveSyncEnd() at /home/perotto/Documentos/GitHub/STU-MB/LoRaProcess.ino line 390
0x400e4415: processFromBomba(cadastro_t*) at /home/perotto/Documentos/GitHub/STU-MB/LoRaProcess.ino line 71
0x400e45ff: processLoraReceive() at /home/perotto/Documentos/GitHub/STU-MB/LoRaProcess.ino line 23
0x400e4fee: doLoRaTask(void*) at /home/perotto/Documentos/GitHub/STU-MB/taskLora.ino line 77
0x40089cf5: vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c line 143
extensive FS / ISR problem
-
- Posts: 9730
- Joined: Thu Nov 26, 2015 4:08 am
Re: extensive FS / ISR problem
Sounds like that ISR is marked as being entirely in IRAM while in fact, it's not. Hard to say without the full error or the code.
Re: extensive FS / ISR problem
Do all sub-function calls also need to be in IRAM?ESP_Sprite wrote: ↑Thu Jul 29, 2021 1:42 amSounds like that ISR is marked as being entirely in IRAM while in fact, it's not. Hard to say without the full error or the code.
-
- Posts: 9730
- Joined: Thu Nov 26, 2015 4:08 am
Re: extensive FS / ISR problem
Yes. All data accessed also needs to be in RAM. Effectively, if your marked-as-in-IRAM ISR touches the flash (or psram, in available) in any way while the flash is erased or written, you'll get this.
Re: extensive FS / ISR problem
Thank you very much, it enlightened me a lot. I was able to understand the problem, now develop a solution.
Who is online
Users browsing this forum: Bing [Bot] and 121 guests