ESP32-S3 How to *actually* use microSD card

mturnbull
Posts: 1
Joined: Mon Feb 21, 2022 11:00 pm

ESP32-S3 How to *actually* use microSD card

Postby mturnbull » Mon Feb 21, 2022 11:17 pm

Hello,

I'm working on a project that involves reading from and writing to a microSD card. I've looked into the documentation and example code, and it appears that the function

Code: Select all

esp_vfs_fat_sdspi_mount(...)
function (or the sdmmc equivalent). However, all of those points say quite clearly that this function is an all-in-one for example purposes only, does not implement error checking, and should not be used in production.

So, my question is, what should I be doing in production? I tried reading through the sourcecode of those functions, but got lost quickly in a chain of various other functions that would need to be reimplemented. I've been able to use the all-in-one function successfully, so I know the card is wired up and I've assigned pins properly; but I haven't been able to compile any of my various attempts to replace the all-in-one example function with something that implements error checking.

Are there any examples of production-level code that demonstrates the entire process of mounting a microSD card? I haven't been able to find anything online other than the sdmmc and sdspi examples on GitHub, which both use their corresponding AIO example functions.

Thanks!

Who is online

Users browsing this forum: No registered users and 30 guests