-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
ESP32-S3 SDMMC support #6323
ESP32-S3 SDMMC support #6323
Conversation
882484e
to
29942e1
Compare
There are still two issues on IDF side which need to be fixed in the IDF driver: espressif/esp-idf#8521 and espressif/esp-idf#8257. These will need to be fixed in IDF |
#define SDMMC_CLK 13 | ||
#define SDMMC_CMD 11 | ||
#define SDMMC_D0 14 | ||
#define SDMMC_D1 12 | ||
#define SDMMC_D2 10 | ||
#define SDMMC_D3 9 | ||
#define BOARD_MAX_SDMMC_FREQ SDMMC_FREQ_DEFAULT |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be removed after the above mentioned IDF issues are fixed and fixes are included into Arduino.
29942e1
to
a457204
Compare
To test on ESP32-S3-USB-OTG, apply the patch: diff --git a/variants/esp32s3/pins_arduino.h b/variants/esp32s3/pins_arduino.h
index 5cd22fa5..f906bd3f 100644
--- a/variants/esp32s3/pins_arduino.h
+++ b/variants/esp32s3/pins_arduino.h
@@ -64,4 +64,15 @@ static const uint8_t T14 = 14;
static const uint8_t DAC1 = 17;
static const uint8_t DAC2 = 18;
+
+#define BOARD_HAS_SDMMC
+#define SDMMC_CLK 36
+#define SDMMC_CMD 35
+#define SDMMC_D0 37
+#define SDMMC_D1 38
+#define SDMMC_D2 33
+#define SDMMC_D3 34
+
+#define BOARD_MAX_SDMMC_FREQ SDMMC_FREQ_DEFAULT
+
#endif /* Pins_Arduino_h */ |
I will actually add a whole board definition for ESP32-S3-USB-OTG, because it's an interesting case to have as example for board support. |
Summary
This PR adds SDMMC support for ESP32-S3.
Unlike ESP32, ESP32-S3 allows all SDMMC pins to be configured flexibly using GPIO matrix. A new function is added to SDMMC class to allow setting the pins.
Impact
Related links
SDMMC docs for S3: https://docs.espressif.com/projects/esp-idf/en/latest/esp32s3/api-reference/peripherals/sdmmc_host.html