Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with using SD_MMC as the SD card protocol #14

Open
sebastianfastert opened this issue Jun 26, 2022 · 7 comments
Open

Problems with using SD_MMC as the SD card protocol #14

sebastianfastert opened this issue Jun 26, 2022 · 7 comments

Comments

@sebastianfastert
Copy link

Hi,

we use SD_MMC to communicate to our SD card, instead of SPI.
Is it possible to use this with your library?
We ran into a few problems while testing and are unsure about the way we should call your lib.
And it seems like the logger_sd.h only supports SPI.

Thanks for all your work.
Greetings.

@fabianoriccardi
Copy link
Owner

fabianoriccardi commented Jul 2, 2022

Hi,
no, the latest stable version (the one present on the Arduino library registry) doesn't work with SD_MMC.

However, I'm refactoring the library so that it will support any FS and storage implementing the FS interface. The latest commit should work properly.

If you will try it, let me know!

@sebastianfastert
Copy link
Author

We forked the repo and changed two lines.

Here is the repo: https://github.com/Wishmob/ESPLogger_MONA

It was only necessary to remove the LittleFS included, because we don't want our project to need that. (Only SD_MMC).

Now it works. Thanks!

@fabianoriccardi
Copy link
Owner

Now it works. Thanks!

Great!

Does #include <LittleFS.h> create issues during compilation? Since it is a new release I would know potential issues.

@sebastianfastert
Copy link
Author

sebastianfastert commented Jul 7, 2022

If I remember correctly, we could not compile it, because we didn't had it installed. And since we don't need it (If think it's just there as a default param), we don't want to depend on it.

@fabianoriccardi
Copy link
Owner

fabianoriccardi commented Jul 8, 2022

That's weird unless you are using an old core version. LittleFS is now the default FS for both ESP8266 and ESP32... Which MCU and which core version are you using?

@sebastianfastert
Copy link
Author

My version is:

➜ pio --version
PlatformIO Core, version 6.0.2

And we have an ESP32.

In the platformio documentation it says the following:

The SPIFFS file system is used by default in order to keep legacy project compatible. To choose LittleFS or FFat as the file system, it should be explicitly specified using board_build.filesystem option in “platformio.ini” (Project Configuration File), for example:

[env:myenv]
platform = espressif32
framework = arduino
board = ...
board_build.filesystem = littlefs

But in our case the partition scheme is default_16MB.csv. It has a SPIFFS partition (I don't think we need that, but it's there) and I guess that will not work with LittleFS.

@fabianoriccardi
Copy link
Owner

fabianoriccardi commented Jul 8, 2022

Understood, I have forgotten that PIO continues to uses spiffs as default, however LittleFS.h is included in the core even if you don't use it.

But in our case the partition scheme is default_16MB.csv.

That doesn't imply that you are constrained to use SPIFFS. That is just the partition table, you can fill each partition with whatever you want. I guess the ESP32's developers have called that partition as spiffs because at the time it was the only FS available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants