The loops waiting for the card to leave its busy state started their yield
backoff at 100 ms. A card is typically busy for a few milliseconds after a
write, so the backoff never fired and every write was followed by hundreds
of back-to-back CMD13 commands. Occupying the host controller like this
slows down unrelated work on both cores, not just the calling task.
Delay between polls instead, starting at CONFIG_SD_READY_POLL_PERIOD_START_US
(100 us) and doubling. Both the delay and the configured start period are
capped at one FreeRTOS tick period, where vTaskDelay() already yields and one
command per tick is not a storm. A typical wait now costs a handful of
commands instead of hundreds.
Applies to sdmmc_wait_for_idle(), sdmmc_init_sd_wait_data_ready() and
read_tuning_block().
Closes https://github.com/espressif/esp-idf/issues/19034
- don't do swapping if result is thrown away
- use correct return code if csd_ver is unknown
- use correct release function
When `heap_caps_malloc`/`heap_caps_calloc` are used for allocation,
`heap_caps_free` should be used to release allocated block.
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>
Replace *common_components with specific driver dependencies across all
peripheral driver test apps and examples to prevent unnecessary CI
triggers
when common_components change.
This follows the same pattern established in TWAI driver commit:
6d21cc6c29
Changes made:
- 26 component test apps updated
(esp_driver_*/test_apps/.build-test-rules.yml)
- 1 driver test app updated
(components/driver/test_apps/.build-test-rules.yml)
- Key examples updated in examples/peripherals/.build-test-rules.yml
- Established standard dependency pattern: esp_hal_xxx, esp_hw_support,
soc
- Added esp_driver_gpio for GPIO-dependent drivers
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
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