-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Doc update: Troubleshooting + SD libs #8241
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
Merged
Merged
Changes from 16 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
bb87561
Updated preferences.rst
PilnyTomas b8bae5f
Added into FAQ info about SPIFFS failed mount
PilnyTomas 9c80ac9
Merge branch 'espressif:master' into doc_update
PilnyTomas 7bb3c70
Merge branch 'espressif:master' into doc_update
PilnyTomas ade1265
Updated troubleshooting
PilnyTomas 8b8b8c2
Moved SPIFFS paragraph from FAQ to troubleshooting
PilnyTomas 0937ed0
Minor updates
PilnyTomas e2468bd
Updated troubleshooting
PilnyTomas 7ae2c68
Updated SD README files and example comments
PilnyTomas 0da7104
Updated troubleshooting with SD issue
PilnyTomas 270cf97
Added note about S3 pins
PilnyTomas 550282c
Updated SDMMC test setPins calls + added definition for default pins
PilnyTomas fa8b1e0
Updated SD_MMC comments
PilnyTomas 825c50d
Added pin table to SD_MMC readme
PilnyTomas dc5fc60
Updated table in SD_SPI
PilnyTomas 11d3285
Updated based on comments
PilnyTomas 8c8ab68
Update io_mux.rst
PilnyTomas b7ef411
Update README.md
PilnyTomas c36edf3
Merge branch 'master' into doc_update
PilnyTomas File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,52 @@ | ||
|
||
# SD library | ||
|
||
This library provides the integration of ESP32 and SD (Secure Digital) cards without additional modules. | ||
|
||
This library provides the integration of ESP32 and SD (Secure Digital) and MMC (Multi Media Card) cards without additional modules. This library is using SPI to interface with the cards. Please not that SPI mode is slower than the intended SD or MMC mode, however, provides more flexibility as the SPI module is available on all ESP SoCs and can be routed to any GPIO through GPIO matrix. | ||
PilnyTomas marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
## Sample wiring diagram: | ||
|
||
 | ||
|
||
 | ||
|
||
For others SD formats: | ||
|
||
For other SD formats: | ||
|
||
 | ||
|
||
|
||
Image source: [Wikipedia](https://upload.wikimedia.org/wikipedia/commons/thumb/a/ab/MMC-SD-miniSD-microSD-Color-Numbers-Names.gif/330px-MMC-SD-miniSD-microSD-Color-Numbers-Names.gif) | ||
|
||
```diff | ||
- Warning: Some ESP32 modules have different pinouts! | ||
``` | ||
> **Warning** | ||
Some ESP32 modules have different pin outs! | ||
|
||
## Default SPI pins: | ||
Note that SPI pins can be configured by using `SPI.begin(sck, miso, mosi, cs);` alternatively you can change only the CS pin with `SD.begin(CSpin)` | ||
|
||
+--------------+---------+-------+----------+----------+----------+ | ||
| SPI Pin Name | ESP8266 | ESP32 | ESP32-S2 | ESP32-C3 | ESP32-S3 | | ||
+==============+=========+=======+==========+==========+==========+ | ||
| CS (SS) | GPIO15 | GPIO5 | GPIO5 | GPIO13 | GPIO13 | | ||
+--------------+---------+-------+----------+----------+----------+ | ||
| DI (MOSI) | GPIO13 | GPIO23| GPIO24 | GPIO14 | GPIO14 | | ||
+--------------+---------+-------+----------+----------+----------+ | ||
| DO (MISO) | GPIO12 | GPIO19| GPIO25 | GPIO15 | GPIO15 | | ||
+--------------+---------+-------+----------+----------+----------+ | ||
| SCK (SCLK) | GPIO14 | GPIO18| GPIO19 | GPIO16 | GPIO16 | | ||
+--------------+---------+-------+----------+----------+----------+ | ||
|
||
## FAQ: | ||
|
||
**Do I need any additional modules, like Arduino SD module?** | ||
**Do I need any additional modules**, like **the **Arduino**** SD module**?** | ||
|
||
No, just wire your SD card directly to ESP32. | ||
|
||
Tip: If you are using a microSD card and have a spare adapter to full-sized SD, you can solder Dupont pins on the adapter. | ||
|
||
|
||
**What is the difference between SD and SD_MMC libraries?** | ||
|
||
SD runs on SPI, and SD_MMC uses the SDMMC hardware bus on the ESP32. | ||
|
||
|
||
|
||
**Can I change the CS pin?** | ||
|
||
Yes, just use: `SD.begin(CSpin)` | ||
The SPI uses 4 communication pins + 2 power connections and operates on up to 80MHz. The SPI option offers flexibility on pin connection because the data connections can be routed through GPIO matrix to any data pin. | ||
SD-SPI speed is approximately half of the SD-MMC even when used on 1-bit line. | ||
You can read more about SD SPI in the [documentation](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/sdspi_host.html) | ||
|
||
SD_MMC is supported only by ESP32 and ESP32-S3 and can be connected only to dedicated pins. SD_MMC allows to use of 1, 4 or 8 data pins + 2 additional communication pins and 2 power pins. The data pins need to be pulled up externally. | ||
You can read more about SD_MMC in the [documentation](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/sdmmc_host.html) | ||
1-bit: SD_MMC_ speed is approximately two-times faster than SPI mode | ||
4-bit: SD_MMC speed is approximately three-times faster than SPI mode. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.