ESP32 interface with SDCard Fastest way

harshaditaliya
Posts: 3
Joined: Mon Jun 15, 2020 11:08 am

ESP32 interface with SDCard Fastest way

Postby harshaditaliya » Mon Jun 15, 2020 12:13 pm

Hi,

I am looking forward to connect SDCard to log data. I am looking forward for interface other than SPI.
Can we do SDIO or any other interface for the same?

Any library available for the same? I have used sdfat-beta in other application but not sure if the same is going to work with ESP32 or not.

I am using Arduino IDE.

PeterR
Posts: 621
Joined: Mon Jun 04, 2018 2:47 pm

Re: ESP32 interface with SDCard Fastest way

Postby PeterR » Mon Jun 15, 2020 11:23 pm

Well IDF:
https://docs.espressif.com/projects/esp ... slave.html

So it is possible. Not sure about Arduino.
Why - 'I am looking forward for interface other than SPI'?
Be good to understand your thinking.
I would say that you're main throughput problem will be flash erase duration. If you FATfs then that lag kills way more than potential bandwidth. If instead you can RAW well you might get >x10 on performance assuming you code to erase ahead - something FAT cannot do for you.
Its an iron triangle thing but RAW will get you much more in performance.
RAW is actually quite easy. Logging is linear and well suited to RAW
PS
FAT is not power fail safe. You can make RAW power fail safe. Hope I am not being too obvious ;)
& I also believe that IDF CAN should be fixed.

harshaditaliya
Posts: 3
Joined: Mon Jun 15, 2020 11:08 am

Re: ESP32 interface with SDCard Fastest way

Postby harshaditaliya » Tue Jun 16, 2020 4:55 am

PeterR wrote:
Mon Jun 15, 2020 11:23 pm
Well IDF:
https://docs.espressif.com/projects/esp ... slave.html

So it is possible. Not sure about Arduino.
Why - 'I am looking forward for interface other than SPI'?
Be good to understand your thinking.
I would say that you're main throughput problem will be flash erase duration. If you FATfs then that lag kills way more than potential bandwidth. If instead you can RAW well you might get >x10 on performance assuming you code to erase ahead - something FAT cannot do for you.
Its an iron triangle thing but RAW will get you much more in performance.
RAW is actually quite easy. Logging is linear and well suited to RAW
PS
FAT is not power fail safe. You can make RAW power fail safe. Hope I am not being too obvious ;)
In my case I have some data coming from outside which is not fixed in length or size.
also SDIO looks faster then SPI interface. In past I have used SDFat-beta which was great but not sure if supported ESP32.

Who is online

Users browsing this forum: No registered users and 72 guests