Good afternoon,
I am using an Esp32S3 in order to receive a file over BLE and write it in the internal Flash of the chip :
- Each frame received over BLE is 237 bytes.
- Each frame received is written in Flash (So 237 bytes are written each time in flash).
In order to do that, the filesystem has been declared/opened using vfs component and the sector size is 512 bytes.
I think that the record time of the entire file is a bit long. Do you think it would be smaller if I wrote 512 bytes each time in Flash ?
Do you know if the vfs component writes a sector size each time ???
Thank you for your help,
Best regards,
Thomas TRUILHE
Esp32S3 : Is it possible to improve the record time in Flash using vfs component ?
-
- Posts: 229
- Joined: Thu Jul 14, 2022 5:15 am
Re: Esp32S3 : Is it possible to improve the record time in Flash using vfs component ?
How large are those files you are sending over BT in chunks of 237 bytes?
If a single file can fit into IRAM or PSRAM then better fetch it there first (if you think flash speed is issue slowing down already slow BT transfer). Once file is received into ram, you can store it asynchronicaly into flash in some background task and freeing that ram.
If a single file can fit into IRAM or PSRAM then better fetch it there first (if you think flash speed is issue slowing down already slow BT transfer). Once file is received into ram, you can store it asynchronicaly into flash in some background task and freeing that ram.
-
- Posts: 229
- Joined: Thu Jul 14, 2022 5:15 am
Re: Esp32S3 : Is it possible to improve the record time in Flash using vfs component ?
Sorry, but my question is not good.
It should be : Do you know how "the writing" of a file in a FileSystem mounted on the Internal Flash of the chip is done ?
Let's imagine I have a mp3 file with a size equal to 150Ko in PSRAM (In a buffer).
Is it faster to write it in Internal Flash (with a FileSystem mounted using VFS) by chuncks with size equal to a sector (512 bytes) ?
Or can I choose the size of chuncks I want (For example 237 bytes).
Thank you for your answer.
Best regards,
Thomas TRUILHE
It should be : Do you know how "the writing" of a file in a FileSystem mounted on the Internal Flash of the chip is done ?
Let's imagine I have a mp3 file with a size equal to 150Ko in PSRAM (In a buffer).
Is it faster to write it in Internal Flash (with a FileSystem mounted using VFS) by chuncks with size equal to a sector (512 bytes) ?
Or can I choose the size of chuncks I want (For example 237 bytes).
Thank you for your answer.
Best regards,
Thomas TRUILHE
-
- Posts: 50
- Joined: Thu Jun 22, 2023 12:50 pm
Re: Esp32S3 : Is it possible to improve the record time in Flash using vfs component ?
Hello.
Could you please specify which filesystem (FATFS, SPIFFS, LittleFS, ...) are you using? As storage media you are using internal flash, is that right? Also which ESP-IDF version are you using?
I would recommend using using LittleFS as it is actively developed and maintained, made for embedded devices as well as being more resistant to corruption than FATFS (while power-loss). Here is a small benchmark in the official repository: https://github.com/joltwallet/esp_littl ... 88kb-files and here you can find example code in ESP-IDF repository: https://github.com/espressif/esp-idf/tr ... e/littlefs
Could you please specify which filesystem (FATFS, SPIFFS, LittleFS, ...) are you using? As storage media you are using internal flash, is that right? Also which ESP-IDF version are you using?
I would recommend using using LittleFS as it is actively developed and maintained, made for embedded devices as well as being more resistant to corruption than FATFS (while power-loss). Here is a small benchmark in the official repository: https://github.com/joltwallet/esp_littl ... 88kb-files and here you can find example code in ESP-IDF repository: https://github.com/espressif/esp-idf/tr ... e/littlefs
-
- Posts: 229
- Joined: Thu Jul 14, 2022 5:15 am
Re: Esp32S3 : Is it possible to improve the record time in Flash using vfs component ?
Hello,
I am using FatFS to work with my files. The FileSystem is mounted on the internal SPI Flash.
I would like to keep FatFS please.
I am using FatFS to work with my files. The FileSystem is mounted on the internal SPI Flash.
I would like to keep FatFS please.
Who is online
Users browsing this forum: No registered users and 75 guests