Load data in faster memory from SPIFF

Mykyta_Markovskyi
Posts: 3
Joined: Tue Jan 09, 2024 8:42 am

Load data in faster memory from SPIFF

Postby Mykyta_Markovskyi » Tue Jan 09, 2024 1:02 pm

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?

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

Re: Load data in faster memory from SPIFF

Postby ESP_Sprite » Tue Jan 09, 2024 1:22 pm

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.

Who is online

Users browsing this forum: No registered users and 79 guests