Esp32S3 : Time to rename a file or remove a file on the Internal Flash is a bit long.
Posted: Mon Apr 14, 2025 2:22 pm
Good afternoon,
I am working with an Esp32S3 and I have mounted a filesystem using VFS on the internal flash of the chip.
The size of the filesystem is about 1Mo and I record some files on it (Let's say some tmp files).
Every X minutes, my program is doing some filecleaning on this filesystem and loops
on the files in order to :
- Rename them.
- Erase them.
The problem is that the time needed to rename a file is something like 300ms and the time needed to remove a file is something
like 900ms.
If the power is lost during the cleaning of these files and the card is shutoff, it seams that the filesystem is totally crashed.
All the files are lost and if I read the filesystem I can see some files called :
- ?????????.??????? or things like that.
Is there a way to speed up file rename or fileerase on the chip ?
Or is there a way to protect the filesystem against power lost ??
Thank you for your help,
This is really important.
I am working with an Esp32S3 and I have mounted a filesystem using VFS on the internal flash of the chip.
The size of the filesystem is about 1Mo and I record some files on it (Let's say some tmp files).
Every X minutes, my program is doing some filecleaning on this filesystem and loops
on the files in order to :
- Rename them.
- Erase them.
The problem is that the time needed to rename a file is something like 300ms and the time needed to remove a file is something
like 900ms.
If the power is lost during the cleaning of these files and the card is shutoff, it seams that the filesystem is totally crashed.
All the files are lost and if I read the filesystem I can see some files called :
- ?????????.??????? or things like that.
Is there a way to speed up file rename or fileerase on the chip ?
Or is there a way to protect the filesystem against power lost ??
Thank you for your help,
This is really important.