Commit Graph

172 Commits

Author SHA1 Message Date
Adam Múdry a959111214 fix(sdmmc): sdmmc_get_blockdev fix potential overflow before widen 2025-12-16 14:23:21 +01: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
Marius Vikhammer 484d2c5c2f fix(system): fixed issues with unused variable warnings when compiling with NDEBUG 2025-09-19 15:42:07 +08:00
Armando (Dou Yiwen) 4a383012b3 Merge branch 'feature/p4_rev3_sdmmc' into 'master'
sdmmc: supported sdmmc on p4 ECO5 real chip, and UHS-I SDR104 (200MHz)

Closes IDF-12222, IDF-13731, and IDF-14050

See merge request espressif/esp-idf!41563
2025-09-17 09:09:24 +00:00
sonika.rathi 4d91eac13f fix(sdmmc): Allow disabling SDIO specific steps in sdmmc card init 2025-09-16 22:24:10 +08:00
armando 28786d0732 feat(sdmmc): supported UHS-I SDR104 (200 MHz) on ESP32-P4 rev3 2025-09-16 12:03:03 +08:00
sonika.rathi c4a3c1fc5b fix(sdmmc): fix sdmmc initialization issue in caused by CMD52 CRC error 2025-06-24 13:48:38 +02: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 (Dou Yiwen) ed8ec9de0b Merge branch 'feat/sdmmc_uhs_tuning' into 'master'
sdmmc: UHS-I support for SDR50 (100MHz, 50MB/s), DDR50 (50MHz, 50MB/s)

Closes IDF-10294, IDF-11447, and IDF-8886

See merge request espressif/esp-idf!34441
2024-11-13 11:05:10 +08:00
Armando 9e3b7e4558 feat(sdmmc): supported UHS-I SDR50 (100Mhz) and DDR50 mode 2024-11-13 09:47:45 +08:00
Adam Múdry b0ffe15514 fix(sdmmc): Fix ACMD22 DMA buffer problem for ESP32-P4 2024-11-12 14:55:19 +01: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 9386b58e17 fix(sdmmc): Generalize waiting for card idle to a function 2024-11-05 02:36:42 +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
Martin Vychodil 12398c0f25 Merge branch 'fix/sdmmc_write_sectors_dma_always_send_cmd13' into 'master'
fix(sdmmc): sdmmc_write_sectors_dma always check card status after write

Closes IDF-9632

See merge request espressif/esp-idf!34132
2024-10-21 20:35:33 +08: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
Adam Múdry 72bbb8c857 fix(sdmmc): Retry to get another RCA if the previous response was 0 2024-10-14 03:25:55 +02: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
Adam Múdry cbf59b4c76 fix(sdmmc): Fix logically dead code in sdmmc_io_rw_extended 2024-07-18 17:28:01 +02:00
Michael (XIAO Xufeng) fded5b0ce3 fix(sdmmc_io): fixed fixed_addr mode will still increase addr when splitting 2024-06-29 02:30:20 +08:00
Alexey Lapshin 0815f6ab8c fix(sdmmc): fix warnings found by GNU static analyzer 2024-06-18 14:25:37 +08:00
Martin Vychodil c4ffee4b81 Merge branch 'feat/sdio_validate_hs_mode' into 'master'
feat(sdmmc): add high speed mode switch validation check for SDIO

See merge request espressif/esp-idf!30743
2024-06-12 15:38:44 +08:00
Ivan Grokhotkov 6ed7e93676 fix(sdmmc): fix invalid data when reading/writing PSRAM buffers
Previous commit has enabled buffers in PSRAM for ESP32-P4. But this
also caused a regression for ESP32-S3, where PSRAM is not DMA capable.
This commit re-introduces the check for esp_ptr_external_ram in case
SOC_SDMMC_PSRAM_DMA_CAPABLE is not set.
2024-06-05 13:12:03 +02:00
sonika.rathi 1af74c8a4a feat(sdmmc): add high speed mode switch validation check for SDIO 2024-05-31 09:14:36 +02:00
Adam Múdry a97aaf19d8 fix: Typo in sdmmc_init_sd_ssr log string 2024-05-28 21:21:34 +02:00
Xiao Xufeng 52baadf0db feat(sdmmc_io): support sending CMD53 with fixed address 2024-05-21 18:09:23 +08:00
Ivan Grokhotkov 49b4bc175e feat(sdmmc): add support for PSRAM DMA on ESP32-P4 2024-04-12 12:56:18 +02:00
gaoxu 40f38bea6f feat(dma): refactor dma calloc function 2024-04-02 14:30:14 +08:00
Armando f0518b3c16 feat(dma): advanced dma malloc helper 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
Ivan Grokhotkov fb95daab06 fix(sdmmc): extend the maximum number of retries of ACMD41
According to the application note in SD Card Physical Specification:

> The host shall set ACMD41 timeout more than 1 second to abort repeat
of issuing ACMD41 when the card does not indicate ready. The timeout
count starts from the first ACMD41 which is set voltage window
in the argument.

Previously, the timeout was exactly one second, and this caused
certain larger-capacity cards to "time out", because they couldn't
finish initialization process in time.
2024-02-28 09:33:24 +01:00
Ivan Grokhotkov 47ba4d639a fix(sdmmc): use correct argument for ACMD41 in SPI mode
ACMD41 argument is different between SD mode and SPI mode.
In SPI mode, the only non-zero bit may be the HCS bit. Unlike the SD
mode, the bits reflecting the host's OCR should be zero.
Previously, we used to set these bits the same way as for the SD mode.
This has caused certain cards to fail initializing, apparently their
controllers have checked the ACMD41 argument more strictly and refused
to finish initialization, resulting in an error such as

    sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107

(Note that this error may have other causes than the one fixed in
this commit. For example, if the card doesn't have a sufficient and
stable power supply, it may also fail to complete the internal
initialization process, and will never clear the busy flag in R1
response.)

Closes https://github.com/espressif/esp-idf/issues/6686
Closes https://github.com/espressif/esp-idf/issues/10542
2024-02-28 09:33:23 +01:00
Xiao Xufeng 216284b767 feat(sdio): add sdio over sdmmc support for esp32p4 2024-01-14 01:05:00 +08:00
Armando 847d525d78 feat(sdmmc): use ldo as power supply on esp32p4 2024-01-04 15:34:59 +08:00
sonika.rathi 8e0ce2fda4 fix(sdmmc): remove the legacy test cases from 'components/sdmmc/test' 2023-12-06 11:14:20 +01:00
Armando b8aba80172 feat(sd): added readme for dependency among SD host related components 2023-11-20 12:30:03 +08:00
Armando a2a489354b refactor(sdmmc): move sdmmc test apps to tools/test_apps 2023-11-16 15:37:32 +08:00
Armando 5b8d904a9b refactor(sdmmc): dependency inversion to sdmmc component 2023-11-16 15:37:32 +08:00
Adam Múdry e151184da7 refactor: Remove -Wno-format from storage related components 2023-10-22 17:56:41 +00:00