-
Notifications
You must be signed in to change notification settings - Fork 7.6k
SD_MMC library issue with BOARD_HAS_1BIT_SDMMC #3903
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
Comments
I can confirm this problem exists for both SD card libraries from the examples ("SD_MMC" and "SD"). Defining 1-bit SD card mode still bugs the pins that are used by default for 4-bit SD card mode. |
If you fork the repository, edit the file (right in your browser), and submit a PR, then this can be fixed. |
I tried that now. I committed that change into my fork repository. But since I already had a pending pull request (from ~3 weeks ago) it got affected too. Before the commit (on the SD library) the previous pull request had 21/21 checks passed but now is 0/0 and has a yellow dot on it. |
No, I didn't know you had a pull pending. If you have multiple PRs you need to make a new branch for your new change. Google knows a lot about working with git and github. |
This issue can be closed. |
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions. |
Hardware:
Board: ESP32-Gateway
Core Installation version: 1.0.4
IDE name: Arduino IDE 1.8.10
Flash Frequency: 80Mhz
PSRAM enabled: no
Upload Speed: 115200
Computer OS: Windows 10
Description:
I tried to use the example sketch from SD_MMC library: SDMMC_Test in 1Bit mode. SD card example itself works without problems. But the other 3 pins that are not used in this mode behave like they have been initialized as alternative function so they can't be used as GPIO (I have attached LED on them and tried to blink it). After some research I have found a way to solve the problem but it involved editing the library itself.
In the file SD_MMC.cpp lines 65-67 by default are:
That changes the mode from 4 to 1 bit, but based on what I saw it doesn't change slot_config structure and thus the pins to be initialized. So I added one line within the body of the if operator and is now:
So now it works but I am not sure if this is the best approach to the problem since I have to change library file. Is there another way to be done? If no - is there any chance to see fix for that in one of the future official releases of the Espressif package?
Sketch:
Basically the sketch is the default example SDMMC_Test + added blinking LED on pin 4 and the setup - attached LED on pin 4.
SDMMC_Test_toggle_4.txt
The text was updated successfully, but these errors were encountered: