37 Commits

Author SHA1 Message Date
Adam Múdry 653cea9c94 fix(sdmmc): Multi-block read/writes support refactor + tests and documentation added 2026-03-16 13:33:03 +01:00
jofrev 6c24854436 feat(sdmmc): Add support for multi-block read/writes
This has the potential of speeding up SD card access significantly.

Reusing the DMA aligned buffer gives the additional option of having to
allocate the transaction buffer only once instead of for every
transaction, while still keeping the improved transaction time.

To give users the maximum amount of control, the Kconfig option for the
transaction buffer size applies only to the temporary buffer, which is
only allocated if the DMA aligned buffer has not been pre-allocated.

Closes https://github.com/espressif/esp-idf/pull/17642

Co-authored-by: Adam Múdry <adam.mudry@espressif.com>
2026-03-16 13:33:03 +01:00
Adam Múdry 543c7b9bff fix(sdspi): 0x106 error during SD card init via SPI related fixes
Try to turn on CRC16 again if first failed, allow disabling of CRC check altogether

Releated https://github.com/espressif/esp-idf/issues/15450
2026-02-02 15:44:59 +01:00
morris 35bdd8c651 feat(dma): graduate the dma driver from esp_hw_support to esp_driver_dma 2026-01-22 14:14:14 +08:00
Alexey Lapshin 31810ae993 feat(esp_libc): make picolibc default libc 2025-12-03 13:31:42 +07:00
C.S.M d5054072eb ci(header_check): Add check for public header should not include freertos 2025-11-28 19:15:17 +08:00
Sonika Rathi 1ee0cb73e4 Merge branch 'fix/sdmmc_ssr_au_size_truncation_issue' into 'master'
fix(sdmmc): fix sdmmc ssr au size truncation issue

Closes IDFGH-16762

See merge request espressif/esp-idf!43259
2025-11-28 00:16:40 +08:00
Adam Múdry 1725be256d feat(storage): Add support for SDMMC BDL 2025-11-11 14:59:56 +01:00
sonika.rathi f5f85004d9 fix(sdmmc): fix sdmmc ssr au size truncation issue
Closes https://github.com/espressif/esp-idf/issues/17846
2025-11-11 13:07:30 +01:00
sonika.rathi 4d91eac13f fix(sdmmc): Allow disabling SDIO specific steps in sdmmc card init 2025-09-16 22:24:10 +08:00
morris fb4b590941 refactor(dma)!: remove deprecated functions 2025-06-12 12:24:58 +08:00
armando c2b8ea07d0 feat(sd): supported UHS-I SDR104 200MHz speed 2025-05-15 10:57:45 +08:00
armando 402bf0ce58 feat(sd): sd host driver layer driver NG 2025-05-15 10:57:33 +08:00
Armando e8ad9b05aa refactor(sd): replace esp_dma_ with heap_caps_ 2025-01-20 10:54:59 +08:00
Armando 9e3b7e4558 feat(sdmmc): supported UHS-I SDR50 (100Mhz) and DDR50 mode 2024-11-13 09:47:45 +08:00
Ivan Grokhotkov c9bf5d9698 feat(sdmmc): support for voltage switching in protocol layer 2024-11-12 15:39:42 +08:00
Adam Múdry 6bf2d91c4d test(sdmmc): Add test_apps test for sdmmc component 2024-11-05 02:36:43 +01:00
Adam Múdry 2c1bec2c70 fix(sdmmc): Send ACMD22 if CMD25 fails
Send the number of the written write blocks (ACMD22) after
write multiple blocks fails (CMD25)
2024-10-31 14:30:51 +01:00
Adam Múdry 9c7609a0e7 fix(sdmmc): Send status (CMD13) even if write/read command fails 2024-10-17 00:58:48 +08:00
Adam Múdry 3f838d7843 fix(sdmmc): Improve SD card state checking after write/read command 2024-10-17 00:58:48 +08:00
Ivan Grokhotkov 71fe7543f1 docs(sdmmc): update information about eMMC support
Related to https://esp32.com/viewtopic.php?f=13&t=41088

Co-authored-by: Zhang Shu Xian <zhangshuxian@espressif.com>
2024-09-10 09:14:54 +02:00
Steffen Beyer 93c67f16ab fix(sdmmc): typo in docs
Closes https://github.com/espressif/esp-idf/pull/14341
2024-08-09 13:45:27 +02:00
Xiao Xufeng 52baadf0db feat(sdmmc_io): support sending CMD53 with fixed address 2024-05-21 18:09:23 +08:00
gaoxu 40f38bea6f feat(dma): refactor dma calloc function 2024-04-02 14:30:14 +08:00
morris 4c2569e2fc change(sdmmc): update ldo acquire driver to new API 2024-03-25 21:19:12 +08:00
Armando ec44556a07 feat(sd): added power control driver and implementation layer with ldo 2024-03-25 11:32:56 +08:00
Xiao Xufeng 216284b767 feat(sdio): add sdio over sdmmc support for esp32p4 2024-01-14 01:05:00 +08:00
Armando 5b8d904a9b refactor(sdmmc): dependency inversion to sdmmc component 2023-11-16 15:37:32 +08:00
Adam Múdry 415e785135 sdmmc: read/write/erase return early on sector count == 0
Closes https://github.com/espressif/esp-idf/issues/10593
2023-03-06 15:45:04 +01:00
Vamshi Gajjela ffdbeee9f6 sdmmc: Add erase command-38. Support erase/trim/discard/sanitize
options.

Erase command (38) for SD cards allows option for erase/dicard/fule
operation at block level and for MMC cards supports option for
discard/trim at block level. When Sanitize is executed only the
portion of data that was unmapped by a Discard command shall be
removed by the Sanitize command.

Unit test cases added to verify ERASE feature in SD/SDSPI mode.
TRIM/DISCARD/SANITIZE tests for eMMC devices.

Closes https://github.com/espressif/esp-idf/pull/7635
Closes https://github.com/espressif/esp-idf/issues/7623
2022-03-05 16:02:01 +05:30
intern 467525f846 docs: fix typo in header files 2021-12-13 13:17:17 +08:00
Jan Procházka fb22c1f182 fatfs: Implementation of disk_status nad disk_initialize for SD/MMC card
FATFS provides a disk status and disk initialize callback which were not
implemented. Implementation has very low impact on SD/MMC speed and
fixes issues, when trying to open file when SD card was removed from
slot and not deinited.

If disk_status returns STA_NOINIT, it will always continue with
disk_initialize. If that returns 0, it will continue like everything is
working normally. So there has to be the same check as in disk_status.
Return of disk_initialize is always checked like this for STA_NOINIT or
STA_PROTECT so if command fails, we return the STA_NOINIT.

stat = disk_initialize(pdrv);
if (stat & STA_NOINIT) return FR_NOT_READY;
if (stat & STA_PROTECT) return FR_WRITE_PROTECTED;

Closes IDF-4125
2021-11-01 15:11:40 +08:00
raldone01 6e2dc5d291 Fix minor documentation issue
Merges https://github.com/espressif/esp-idf/pull/6192

Signed-off-by: yiying <yiying@MacBook-Air-Cindy.local>
2020-12-25 15:46:36 +08:00
Michael (XIAO Xufeng) b98b4c3886 sdmmc_io: support to print CIS information
Currently only ESP slaves can be parsed correctly.
2019-07-29 10:41:17 +08:00
Ivan Grokhotkov de42d99b1d sdmmc: command layer refactoring 2018-08-30 13:11:54 +08:00
Ivan Grokhotkov ee600784c5 sdmmc: add SDIO support
- Add SDIO support at protocol layer (probing, data transfer, interrupts)
- Add SDIO interrupts support in SDMMC host
- Add test (communicate with ESP32 in SDIO download mode)
2018-04-11 11:07:13 +08:00
Ivan Grokhotkov edd924f273 sdmmc: add peripheral driver and protocol layer 2017-01-09 04:51:24 +08:00