6f7a1ca76a
* Initial changes to compile under ESP-IDF v5.1 * Initial import for ESP-IDF v5.1 libs * Update toolchain * Update esp32-hal-psram.c * Add missing LDs * Update platform.txt * Stop some CI jobs, because they will always fail * Fix examples * Update app_httpd.cpp * Update ResetReason.ino * Warnings fixes * Added the example guideline and template (#7665) * Added the example guideline and template * PR review changes with some typos and grammar fixes * Changes according to the PR review * Added ESP32-S3 link to the datasheet (#7738) * Update HiFreq_ADC.ino * Replace periph_ctrl.h use because of deprecation * Replace esp_spi_flash.h use because of deprecation * Add includes to male mDNS::enableWorkstation compile * Fix ssl_client mbedtls_pk_parse_key callback * Update temperature sensor driver * Allow sketch_utils to compile with arduino-cli * Run CI with arduino-cli * Fix arduino-cli CI build on Windows * Refactor platform.txt to not use components installed through the board manager when running from git * Initial Peripheral Manager Implementation * Update SigmaDelta driver to use the new ESP-IDF driver API * Small improvements to peripheral manager and SigmaDelta * Remove deleted function from SigmaDelta header * Update DAC driver to use the new ESP-IDF driver API * Adds softAp(String) to make it compatible with ESP8266 (#7801) * Fix commentary (#7800) Minor fix based on observation done in https://github.com/espressif/arduino-esp32/issues/7795#issuecomment-1416868611 * add adafruit new board feather esp32s2 reserve tft (#7794) * bugfix: add <stdint.h> for uint8_t to avoid compilation failure (GCC 11.2.0) (#7744) * Adding 3rd party boards for VALTRACK-V4-VTS-ESP32-C3 & VALTRACK-V4-MFW-ESP32-C3 (#7735) * Added VALTRACK-V4-VTS-ESP32-C3 board definition Created pins_arduino.h & made changes to boards.txt with necessary changes * Modified the URL * Renamed json * renamed all auRL * Adding VALTRACK-V4 series board definitions Added VALTRACK-V4-VTS-ESP32C3 & VALTRACK-V4-MFW-ESP32-C3 board variants * Adding VALTRACK-V4 series board definitions Added VALTRACK-V4-VTS-ESP32C3 & VALTRACK-V4-MFW-ESP32-C3 board variants * Reverted package_esp32_index.template.json restored package_esp32_index.template.json from edits * Reverted package_esp32_index.template.json Added new line to package_esp32_index.template.json * Update Platformio CI (#7725) * WiFiClient example fix (#7711) * Modified WiFiClient example to use thingspeak instead of non-functionig sparkfun * Moved instructions to README * Fixed spelling * Added link to S3 datasheet --------- Co-authored-by: Jan Procházka <90197375+P-R-O-C-H-Y@users.noreply.github.com> * Mirror update from Heltec repository (#7709) Heltec updated the I2C pins in |
||
---|---|---|
.. | ||
examples | ||
src | ||
library.properties | ||
README.md |
SD library
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 note 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.
Sample wiring diagram:
For other SD formats:
Image source: Wikipedia
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 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. 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
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 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.