Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Useful option to add to ESP IDF - do flash writes from worker task. (CON-1518) #1249

Open
jonsmirl opened this issue Jan 18, 2025 · 0 comments

Comments

@jonsmirl
Copy link
Contributor

jonsmirl commented Jan 18, 2025

You can't do flash writes from tasks which have their stack in PSRAM. That's just a limitation of the ESP architecture. The work around for this is to make a worker task with a small stack in internal RAM and then queue the writes to this worker task.

The trouble with this is that now I have to hunt down every place which is doing flash writes and then change the code to queue them to the worker task. How about giving me an option in the ESP IDF SPI flash driver to do flash writes from a worker task? Then the IDF will automatically modify everything which does flash writes.

This is not as simple as it seems, for example the flash write currently bothering me is inside the SPIFFS file system code. Since I don't want to modify SPIFFS now I have to move my file system calls into a worker task.

@github-actions github-actions bot changed the title Useful option to add to ESP IDF - do flash writes from worker task. Useful option to add to ESP IDF - do flash writes from worker task. (CON-1518) Jan 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant