Page 1 of 1

Load data in faster memory from SPIFF

Posted: Tue Jan 09, 2024 1:02 pm
by Mykyta_Markovskyi
Hi,
I am using the ESP32-S3 and trying to load approximately 800 KB (around 40 files) from SPIFF to RAM (stack) in the main task. However, I am encountering a stack overflow error. Unfortunately, I cannot increase the main task stack size in the ESP-IDF SDK Configuration Editor beyond approximately 100,000 (I believe it's in bytes, but I'm not certain). I've attempted to use other tasks with FreeRTOS with sufficient space, but that hasn't resolved the issue.

My question is: Is it possible to load 800 KB into fast RAM on the ESP32-S3? If not, how can I enhance the performance of SPIFFs?

Re: Load data in faster memory from SPIFF

Posted: Tue Jan 09, 2024 1:22 pm
by ESP_Sprite
Unless you have (a chip or module with) PSRAM, you won't have enough memory, the S3 only has only 500K or so of RAM in total. If you have PSRAM (and generally, for large buffers), you want to allocate the data buffer for the file data using e.g. calloc() rather than on the stack.