is sdmmc driver reentrant?
is sdmmc driver reentrant?
I am trying to implement a webserver which serves the webpages stored on an SD card. It also should be able to serve more than one simultaneous connection. For this the esp-idf driver for the SD card needs to be reentrant. Is this the case?
"Whoever believes to be someone has stopped becoming someone"
Sokrates
Sokrates
Re: is sdmmc driver reentrant?
If you are reading files from FAT filesystem via standard C library functions, then you can do so from multiple concurrent tasks. Keep in mind that FATFS library does not support some concurrent operations on same file (reading/writing from one task and deleting it from the other).
If you aren't using FATFS, and accessing SD card as raw storage via sdmmc protocol layer, you need to add locking around SD card commands yourself.
If you aren't using FATFS, and accessing SD card as raw storage via sdmmc protocol layer, you need to add locking around SD card commands yourself.
Re: is sdmmc driver reentrant?
thank you for your fast answer.
yes, I will be using FAT filesystem with the in esp-idf provided C library. The webpages of course will only be read; so, a simultaneous read of the same file from two different tasks needs to be possible. I guess your answer gives green light for this approach, right?
yes, I will be using FAT filesystem with the in esp-idf provided C library. The webpages of course will only be read; so, a simultaneous read of the same file from two different tasks needs to be possible. I guess your answer gives green light for this approach, right?
"Whoever believes to be someone has stopped becoming someone"
Sokrates
Sokrates
Re: is sdmmc driver reentrant?
Yes, simultaneous read from the same file from different tasks is possible.
Who is online
Users browsing this forum: ESPBoards and 91 guests