Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions libraries/SD_MMC/src/SD_MMC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,17 +228,19 @@ bool SDMMCFS::begin(const char *mountpoint, bool mode1bit, bool format_if_mount_
#if defined(CONFIG_IDF_TARGET_ESP32P4) && defined(BOARD_SDMMC_SLOT) && (BOARD_SDMMC_SLOT == 0)
host.slot = SDMMC_HOST_SLOT_0;
// reconfigure slot_config to remove all pins in order to use IO_MUX
// Use 0 instead of GPIO_NUM_NC (-1) because ESP-IDF's s_check_pin_not_set()
// function uses !pin which doesn't work correctly with -1 (GPIO_NUM_NC)
slot_config = sdmmc_slot_config_t{
.clk = GPIO_NUM_NC,
.cmd = GPIO_NUM_NC,
.d0 = GPIO_NUM_NC,
.d1 = GPIO_NUM_NC,
.d2 = GPIO_NUM_NC,
.d3 = GPIO_NUM_NC,
.d4 = GPIO_NUM_NC,
.d5 = GPIO_NUM_NC,
.d6 = GPIO_NUM_NC,
.d7 = GPIO_NUM_NC,
.clk = GPIO_NUM_0,
.cmd = GPIO_NUM_0,
.d0 = GPIO_NUM_0,
.d1 = GPIO_NUM_0,
.d2 = GPIO_NUM_0,
.d3 = GPIO_NUM_0,
.d4 = GPIO_NUM_0,
.d5 = GPIO_NUM_0,
.d6 = GPIO_NUM_0,
.d7 = GPIO_NUM_0,
.cd = SDMMC_SLOT_NO_CD,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest you report this to IDF team, as it seems this is not the proper way things should be. There is no reason why IO0 can't be used

.wp = SDMMC_SLOT_NO_WP,
.width = 4,
Expand Down
Loading