You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge branch 'fix/sdsdpi_example_esp32p4_add_ldo_config_v5.3' into 'release/v5.3'
fix(storage): Fix and update storage examples using SD cards for SoCs with SOC_SDMMC_IO_POWER_EXTERNAL 1 (ESP32-P4) (v5.3)
See merge request espressif/esp-idf!31029
@@ -97,6 +97,21 @@ This command will burn the `XPD_SDIO_TIEH`, `XPD_SDIO_FORCE`, and `XPD_SDIO_REG`
97
97
98
98
See [the document about pullup requirements](https://docs.espressif.com/projects/esp-idf/en/latest/api-reference/peripherals/sd_pullup_requirements.html) for more details about pullup support and compatibility of modules and development boards.
99
99
100
+
#### ESP32-P4 related notes
101
+
102
+
This only applies when `Test SD card` setting in `Performance Benchmark Example Configuration` is enabled.
103
+
104
+
On ESP32-P4, Slot 1 of the SDMMC peripheral is connected to GPIO pins using GPIO matrix. This allows arbitrary GPIOs to be used to connect an SD card. In this example, GPIOs can be configured in two ways:
105
+
106
+
1. Using menuconfig: Run `idf.py menuconfig` in the project directory and open `Performance Benchmark Example Configuration` menu.
107
+
2. In the source code: See the initialization of `sdmmc_slot_config_t slot_config` structure in the example code.
108
+
109
+
If pins selected correspond with default pins used for ESP32-P4 SDMMC (i.e. SD card slot is connected to them), possibly an additional setting up needs to be done.
110
+
111
+
These pins are able to connect to an ultra high-speed SD card (UHS-I) which requires 1.8V switching (instead of the regular 3.3V). This means the user has to provide an external LDO power supply to use them, or to enable and configure an internal LDO via `idf.py menuconfig` -> `SD/MMC Example Configuration` -> `SD power supply comes from internal LDO IO`.
112
+
113
+
When using different GPIO pins this is not required and `SD power supply comes from internal LDO IO` setting can be disabled.
114
+
100
115
### Note about SPIFFS
101
116
102
117
The test for SPIFFS is run only once, because SPIFFS has a problem with deleting files.
Copy file name to clipboardExpand all lines: examples/storage/sd_card/sdmmc/README.md
+5-1Lines changed: 5 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ GPIO34 | D3 | not used in 1-line SD mode, but card's D3 pin must
70
70
71
71
On ESP32-P4, Slot 1 of the SDMMC peripheral is connected to GPIO pins using GPIO matrix. This allows arbitrary GPIOs to be used to connect an SD card. In this example, GPIOs can be configured in two ways:
72
72
73
-
1. Using menuconfig: Run `idf.py menuconfig` in the project directory and open "SD/MMC Example Configuration" menu.
73
+
1. Using menuconfig: Run `idf.py menuconfig` in the project directory and open `SD/MMC Example Configuration` menu.
74
74
2. In the source code: See the initialization of `sdmmc_slot_config_t slot_config` structure in the example code.
75
75
76
76
The table below lists the default pin assignments.
@@ -84,6 +84,10 @@ GPIO40 | D1 | not used in 1-line SD mode; 10k pullup in 4-line m
84
84
GPIO41 | D2 | not used in 1-line SD mode; 10k pullup in 4-line mode
85
85
GPIO42 | D3 | not used in 1-line SD mode, but card's D3 pin must have a 10k pullup
86
86
87
+
Default dedicated pins on ESP32-P4 are able to connect to an ultra high-speed SD card (UHS-I) which requires 1.8V switching (instead of the regular 3.3V). This means the user has to provide an external LDO power supply to use them, or to enable and configure an internal LDO via `idf.py menuconfig` -> `SD/MMC Example Configuration` -> `SD power supply comes from internal LDO IO`.
88
+
89
+
When using different GPIO pins this is not required and `SD power supply comes from internal LDO IO` setting can be disabled.
90
+
87
91
### 4-line and 1-line SD modes
88
92
89
93
By default, this example uses 4 line SD mode, utilizing 6 pins: CLK, CMD, D0 - D3. It is possible to use 1-line mode (CLK, CMD, D0) by changing "SD/MMC bus width" in the example configuration menu (see `CONFIG_EXAMPLE_SDMMC_BUS_WIDTH_1`).
@@ -63,6 +63,28 @@ With the default pin assignments, this example is compatible ESP32-S2-USB-OTG an
63
63
64
64
For other development boards, adjust the pin assignments as explained above.
65
65
66
+
#### ESP32-P4 related notes
67
+
68
+
On ESP32-P4, Slot 1 of the SDMMC peripheral is connected to GPIO pins using GPIO matrix. This allows arbitrary GPIOs to be used to connect an SD card. In this example, GPIOs can be configured in two ways:
69
+
70
+
1. Using menuconfig: Run `idf.py menuconfig` in the project directory and open `SD SPI Example Configuration` menu.
71
+
2. In the source code: See the initialization of `sdmmc_slot_config_t slot_config` structure in the example code.
72
+
73
+
Default pins for SDSPI are listed in the table above [Pin assignments](#1-pin-assignments) and using them doesn't require any additional settings.
74
+
75
+
However on some development boards the SD card slot can be wired to default dedicated pins for SDMMC, which are listed in the table below.
76
+
77
+
SD card pin | ESP32-P4 pin
78
+
------------|--------------
79
+
D0 (MISO) | GPIO39
80
+
D3 (CS) | GPIO42
81
+
CLK (SCK) | GPIO43
82
+
CMD (MOSI) | GPIO44
83
+
84
+
These pins are able to connect to an ultra high-speed SD card (UHS-I) which requires 1.8V switching (instead of the regular 3.3V). This means the user has to provide an external LDO power supply to use them, or to enable and configure an internal LDO via `idf.py menuconfig` -> `SD/MMC Example Configuration` -> `SD power supply comes from internal LDO IO`.
85
+
86
+
When using different GPIO pins this is not required and `SD power supply comes from internal LDO IO` setting can be disabled.
87
+
66
88
#### Notes for ESP32-C3 and other chips
67
89
68
90
Espressif doesn't offer development boards with an SD card slot for these chips. Please check the pin assignments and adjust them for your board if necessary. The process to change pin assignments is described above.
0 commit comments