Skip to content

Commit 1ec79cd

Browse files
Merge pull request #405 from espressif/bugfix/p4_ev_board_sd_slot
fix(esp32_p4_function_ev_board): use slot 0 for SD card
2 parents 0a83a89 + 363acd4 commit 1ec79cd

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

bsp/esp32_p4_function_ev_board/esp32_p4_function_ev_board.c

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ esp_err_t bsp_sdcard_mount(void)
8989
};
9090

9191
sdmmc_host_t host = SDMMC_HOST_DEFAULT();
92+
host.slot = SDMMC_HOST_SLOT_0;
9293
host.max_freq_khz = SDMMC_FREQ_HIGHSPEED;
9394

9495
sd_pwr_ctrl_ldo_config_t ldo_config = {
@@ -103,16 +104,7 @@ esp_err_t bsp_sdcard_mount(void)
103104
host.pwr_ctrl_handle = pwr_ctrl_handle;
104105

105106
const sdmmc_slot_config_t slot_config = {
106-
.clk = BSP_SD_CLK,
107-
.cmd = BSP_SD_CMD,
108-
.d0 = BSP_SD_D0,
109-
.d1 = BSP_SD_D1,
110-
.d2 = BSP_SD_D2,
111-
.d3 = BSP_SD_D3,
112-
.d4 = GPIO_NUM_NC,
113-
.d5 = GPIO_NUM_NC,
114-
.d6 = GPIO_NUM_NC,
115-
.d7 = GPIO_NUM_NC,
107+
/* SD card is connected to Slot 0 pins. Slot 0 uses IO MUX, so not specifying the pins here */
116108
.cd = SDMMC_SLOT_NO_CD,
117109
.wp = SDMMC_SLOT_NO_WP,
118110
.width = 4,

bsp/esp32_p4_function_ev_board/idf_component.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: "4.0.0"
1+
version: "4.0.1"
22
description: Board Support Package (BSP) for ESP32-P4 Function EV Board (preview)
33
url: https://github.com/espressif/esp-bsp/tree/master/bsp/esp32_p4_function_ev_board
44

0 commit comments

Comments
 (0)