Files
esp-idf/examples/storage/sd_card/sdmmc/main/Kconfig.projbuild

170 lines
5.5 KiB
Plaintext

menu "SD/MMC Example Configuration"
config EXAMPLE_FORMAT_IF_MOUNT_FAILED
bool "Format the card if mount failed"
default n
help
If this config item is set, format_if_mount_failed will be set to true and the card will be formatted if
the mount has failed.
config EXAMPLE_FORMAT_SD_CARD
bool "Format the card as a part of the example"
default n
help
If this config item is set, the card will be formatted as a part of the example.
choice EXAMPLE_SDMMC_BUS_WIDTH
prompt "SD/MMC bus width"
default EXAMPLE_SDMMC_BUS_WIDTH_4
help
Select the bus width of SD or MMC interface.
Note that even if 1 line mode is used, D3 pin of the SD card must have a pull-up resistor connected.
Otherwise the card may enter SPI mode, the only way to recover from which is to cycle power to the card.
config EXAMPLE_SDMMC_BUS_WIDTH_4
bool "4 lines (D0 - D3)"
config EXAMPLE_SDMMC_BUS_WIDTH_1
bool "1 line (D0)"
endchoice
choice EXAMPLE_SDMMC_SPEED_MODE
prompt "SD/MMC speed mode"
default EXAMPLE_SDMMC_SPEED_DS
config EXAMPLE_SDMMC_SPEED_DS
bool "Default Speed"
config EXAMPLE_SDMMC_SPEED_HS
bool "High Speed"
config EXAMPLE_SDMMC_SPEED_UHS_I_SDR50
bool "UHS-I SDR50 (100 MHz, 50 MB/s)"
depends on SOC_SDMMC_UHS_I_SUPPORTED
config EXAMPLE_SDMMC_SPEED_UHS_I_DDR50
bool "UHS-I DDR50 (50 MHz, 50 MB/s)"
depends on SOC_SDMMC_UHS_I_SUPPORTED
config EXAMPLE_SDMMC_SPEED_UHS_I_SDR104
bool "UHS-I SDR104 (200 MHz, 100 MB/s)"
depends on SOC_SDMMC_UHS_I_SUPPORTED
endchoice
config EXAMPLE_PIN_CMD
int
prompt "CMD GPIO number" if SOC_SDMMC_USE_GPIO_MATRIX
default 35 if IDF_TARGET_ESP32S3
default 44 if IDF_TARGET_ESP32P4
default 15 if IDF_TARGET_ESP32
config EXAMPLE_PIN_CLK
int
prompt "CLK GPIO number" if SOC_SDMMC_USE_GPIO_MATRIX
default 36 if IDF_TARGET_ESP32S3
default 43 if IDF_TARGET_ESP32P4
default 14 if IDF_TARGET_ESP32
config EXAMPLE_PIN_D0
int
prompt "D0 GPIO number" if SOC_SDMMC_USE_GPIO_MATRIX
default 37 if IDF_TARGET_ESP32S3
default 39 if IDF_TARGET_ESP32P4
default 2 if IDF_TARGET_ESP32
if EXAMPLE_SDMMC_BUS_WIDTH_4
config EXAMPLE_PIN_D1
int
prompt "D1 GPIO number" if SOC_SDMMC_USE_GPIO_MATRIX
default 38 if IDF_TARGET_ESP32S3
default 40 if IDF_TARGET_ESP32P4
default 4 if IDF_TARGET_ESP32
config EXAMPLE_PIN_D2
int
prompt "D2 GPIO number" if SOC_SDMMC_USE_GPIO_MATRIX
default 33 if IDF_TARGET_ESP32S3
default 41 if IDF_TARGET_ESP32P4
default 12 if IDF_TARGET_ESP32
config EXAMPLE_PIN_D3
int
prompt "D3 GPIO number" if SOC_SDMMC_USE_GPIO_MATRIX
default 34 if IDF_TARGET_ESP32S3
default 42 if IDF_TARGET_ESP32P4
default 13 if IDF_TARGET_ESP32
endif # EXAMPLE_SDMMC_BUS_WIDTH_4
config EXAMPLE_DEBUG_PIN_CONNECTIONS
bool "Debug sd pin connections and pullup strength"
default n
config EXAMPLE_ENABLE_ADC_FEATURE
bool "Enable ADC feature"
depends on EXAMPLE_DEBUG_PIN_CONNECTIONS
default y if IDF_TARGET_ESP32
default n
config EXAMPLE_ADC_UNIT
int "ADC Unit"
depends on EXAMPLE_ENABLE_ADC_FEATURE
default 1 if IDF_TARGET_ESP32
default 1
config EXAMPLE_ADC_PIN_CLK
int "CLK mapped ADC pin"
depends on EXAMPLE_ENABLE_ADC_FEATURE
default 6 if IDF_TARGET_ESP32
default 1
config EXAMPLE_ADC_PIN_CMD
int "CMD mapped ADC pin"
depends on EXAMPLE_ENABLE_ADC_FEATURE
default 3 if IDF_TARGET_ESP32
default 1
config EXAMPLE_ADC_PIN_D0
int "D0 mapped ADC pin"
depends on EXAMPLE_ENABLE_ADC_FEATURE
default 2 if IDF_TARGET_ESP32
default 1
if EXAMPLE_SDMMC_BUS_WIDTH_4
config EXAMPLE_ADC_PIN_D1
int "D1 mapped ADC pin"
depends on EXAMPLE_ENABLE_ADC_FEATURE
default 0 if IDF_TARGET_ESP32
default 1
config EXAMPLE_ADC_PIN_D2
int "D2 mapped ADC pin"
depends on EXAMPLE_ENABLE_ADC_FEATURE
default 5 if IDF_TARGET_ESP32
default 1
config EXAMPLE_ADC_PIN_D3
int "D3 mapped ADC pin"
depends on EXAMPLE_ENABLE_ADC_FEATURE
default 4 if IDF_TARGET_ESP32
default 1
endif # EXAMPLE_SDMMC_BUS_WIDTH_4
config EXAMPLE_SD_PWR_CTRL_LDO_INTERNAL_IO
depends on SOC_SDMMC_IO_POWER_EXTERNAL
bool "SD power supply comes from internal LDO IO (READ HELP!)"
default y
help
Only needed when the SD card is connected to specific IO pins which can be used for high-speed SDMMC.
Please read the schematic first and check if the SD VDD is connected to any internal LDO output.
Unselect this option if the SD card is powered by an external power supply.
config EXAMPLE_SD_PWR_CTRL_LDO_IO_ID
depends on SOC_SDMMC_IO_POWER_EXTERNAL && EXAMPLE_SD_PWR_CTRL_LDO_INTERNAL_IO
int "LDO ID"
default 4 if IDF_TARGET_ESP32P4
help
Please read the schematic first and input your LDO ID.
endmenu