Skip to content

Commit

Permalink
Merge branch 'bugfix/fix_examples_sdmmc_card_init_failure_esp32s3_v4.…
Browse files Browse the repository at this point in the history
…4' into 'release/v4.4'

SDMMC example: Fix for 'sdmmc_card_init failed for ESP32S3' (v4.4)

See merge request espressif/esp-idf!22653
  • Loading branch information
jack0c committed Mar 21, 2023
2 parents 48b3f23 + d91efe9 commit 8cea383
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
5 changes: 3 additions & 2 deletions examples/storage/sd_card/sdmmc/main/Kconfig.projbuild
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ menu "SD/MMC Example Configuration"
bool "1 line (D0)"
endchoice

if SOC_SDMMC_USE_GPIO_MATRIX

if IDF_TARGET_ESP32S3

config EXAMPLE_PIN_CMD
int "CMD GPIO number"
Expand Down Expand Up @@ -52,6 +53,6 @@ menu "SD/MMC Example Configuration"

endif # EXAMPLE_SDMMC_BUS_WIDTH_4

endif # SOC_SDMMC_USE_GPIO_MATRIX
endif # IDF_TARGET_ESP32S3

endmenu
4 changes: 2 additions & 2 deletions examples/storage/sd_card/sdmmc/main/sd_card_example_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void app_main(void)

// On chips where the GPIOs used for SD card can be configured, set them in
// the slot_config structure:
#ifdef CONFIG_SOC_SDMMC_USE_GPIO_MATRIX
#ifdef CONFIG_IDF_TARGET_ESP32S3
slot_config.clk = CONFIG_EXAMPLE_PIN_CLK;
slot_config.cmd = CONFIG_EXAMPLE_PIN_CMD;
slot_config.d0 = CONFIG_EXAMPLE_PIN_D0;
Expand All @@ -70,7 +70,7 @@ void app_main(void)
slot_config.d2 = CONFIG_EXAMPLE_PIN_D2;
slot_config.d3 = CONFIG_EXAMPLE_PIN_D3;
#endif // CONFIG_EXAMPLE_SDMMC_BUS_WIDTH_4
#endif // CONFIG_SOC_SDMMC_USE_GPIO_MATRIX
#endif // CONFIG_IDF_TARGET_ESP32S3

// Enable internal pullups on enabled pins. The internal pullups
// are insufficient however, please make sure 10k external pullups are
Expand Down

0 comments on commit 8cea383

Please sign in to comment.