menu "Performance Benchmark Example Configuration" config EXAMPLE_TARGET_RW_SIZE int "Target size for read/write (bytes)" default 65536 help This is the target size used for the benchmark, it represents how much data will be transferred in each test. (The actual size of the allocated buffer will be larger for "more than target size" cases.) The test will test will show the performance of reading and writing of both slightly more and slightly less than this size as well. This will greatly affect the performance of the benchmark. In general, the larger the rw size, the better the performance. For FATFS, the best performance is achieved when the rw size matches the cluster size or is at least a multiple of the sector size. config EXAMPLE_TEST_TRIES int "Number of test tries" default 10 help The number of times to run the benchmark. The average value will be displayed. config EXAMPLE_USE_BYTES bool "Use bytes instead of bits" default y help If this config item is set, the IO speed will be displayed in megabytes per second instead of megabits per second. config EXAMPLE_TEST_SPIFLASH bool "Test internal SPI flash" default y help If this config item is set, the internal SPI flash will be tested. menu "Internal flash test config" depends on EXAMPLE_TEST_SPIFLASH config EXAMPLE_TEST_SPIFLASH_RAW bool "Test raw access" default y help If this config item is set, raw access will be tested. config EXAMPLE_TEST_SPIFLASH_FATFS bool "Test FATFS" default y help If this config item is set, FATFS will be tested. config EXAMPLE_FATFS_SPIFLASH_CLUSTER_SIZE depends on EXAMPLE_TEST_SPIFLASH_FATFS int "Cluster size for FATFS on internal flash" default EXAMPLE_TARGET_RW_SIZE help The cluster size of the FATFS filesystem. The cluster size must be a multiple of the sector size. The default value is the same as the target read/write size. The larger the cluster size, the better the performance, but the more space will be wasted on the storage medium. config EXAMPLE_TEST_SPIFLASH_SPIFFS bool "Test SPIFFS" default y help If this config item is set, SPIFFS will be tested. config EXAMPLE_TEST_SPIFLASH_LITTLEFS bool "Test LittleFS" default y help If this config item is set, LittleFS will be tested. endmenu # "Internal flash test config" config EXAMPLE_TEST_SD_CARD bool "Test SD card" default y help If this config item is set, the SD card will be tested after it is mounted. choice EXAMPLE_SD_CARD_INTERFACE prompt "SD card interface" depends on EXAMPLE_TEST_SD_CARD default EXAMPLE_USE_SDMMC if SOC_SDMMC_HOST_SUPPORTED default EXAMPLE_USE_SDSPI if !SOC_SDMMC_HOST_SUPPORTED help Select the SD card interface. if SOC_SDMMC_HOST_SUPPORTED config EXAMPLE_USE_SDMMC bool "SDMMC" endif # SOC_SDMMC_HOST_SUPPORTED config EXAMPLE_USE_SDSPI bool "SDSPI" endchoice # EXAMPLE_SD_CARD_INTERFACE menu "SD card test config" depends on EXAMPLE_TEST_SD_CARD config EXAMPLE_TEST_SD_CARD_RAW bool "Test raw access" default y help If this config item is set, raw access will be tested. config EXAMPLE_TEST_SD_CARD_FATFS bool "Test FATFS" default y help If this config item is set, FATFS will be tested. config EXAMPLE_FATFS_SD_CARD_CLUSTER_SIZE depends on EXAMPLE_TEST_SD_CARD_FATFS int "Cluster size for FATFS on SD card" default EXAMPLE_TARGET_RW_SIZE help The cluster size of the FATFS filesystem. The cluster size must be a multiple of the sector size. The default value is the same as the target read/write size. The larger the cluster size, the better the performance, but the more space will be wasted on the storage medium. config EXAMPLE_TEST_SD_CARD_LITTLEFS bool "Test LittleFS" default y help If this config item is set, LittleFS will be tested. choice EXAMPLE_SD_CARD_FREQ_PICKER prompt "SD card frequency" default EXAMPLE_SD_FREQ_HIGHSPEED if EXAMPLE_USE_SDMMC default EXAMPLE_SD_FREQ_DEFAULT if EXAMPLE_USE_SDSPI help Select the frequency of SD card interface. config EXAMPLE_SD_FREQ_PROBING bool "Probing frequency (400kHz)" config EXAMPLE_SD_FREQ_DEFAULT bool "Default frequency (20MHz)" config EXAMPLE_SD_FREQ_HIGHSPEED bool "High speed frequency (40MHz)" depends on EXAMPLE_USE_SDMMC config EXAMPLE_SD_FREQ_CUSTOM bool "Custom frequency" endchoice # EXAMPLE_SD_CARD_FREQ_PICKER config EXAMPLE_SD_FREQ_CUSTOM_VAL int "Custom frequency (kHz)" default 20000 depends on EXAMPLE_SD_FREQ_CUSTOM help Enter the custom frequency of SD card interface. if EXAMPLE_USE_SDMMC choice EXAMPLE_SDMMC_BUS_WIDTH prompt "SD/MMC bus width" 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_8 bool "8 lines (D0 - D7)" depends on IDF_TARGET_ESP32S3 || IDF_TARGET_ESP32P4 config EXAMPLE_SDMMC_BUS_WIDTH_4 bool "4 lines (D0 - D3)" config EXAMPLE_SDMMC_BUS_WIDTH_1 bool "1 line (D0)" endchoice # EXAMPLE_SDMMC_BUS_WIDTH if SOC_SDMMC_USE_GPIO_MATRIX config EXAMPLE_PIN_CMD int "CMD GPIO number" default 35 if IDF_TARGET_ESP32S3 default 44 if IDF_TARGET_ESP32P4 config EXAMPLE_PIN_CLK int "CLK GPIO number" default 36 if IDF_TARGET_ESP32S3 default 43 if IDF_TARGET_ESP32P4 config EXAMPLE_PIN_D0 int "D0 GPIO number" default 37 if IDF_TARGET_ESP32S3 default 39 if IDF_TARGET_ESP32P4 if EXAMPLE_SDMMC_BUS_WIDTH_4 || EXAMPLE_SDMMC_BUS_WIDTH_8 config EXAMPLE_PIN_D1 int "D1 GPIO number" default 38 if IDF_TARGET_ESP32S3 default 40 if IDF_TARGET_ESP32P4 config EXAMPLE_PIN_D2 int "D2 GPIO number" default 33 if IDF_TARGET_ESP32S3 default 41 if IDF_TARGET_ESP32P4 config EXAMPLE_PIN_D3 int "D3 GPIO number" default 34 if IDF_TARGET_ESP32S3 default 42 if IDF_TARGET_ESP32P4 endif # EXAMPLE_SDMMC_BUS_WIDTH_4 || EXAMPLE_SDMMC_BUS_WIDTH_8 if EXAMPLE_SDMMC_BUS_WIDTH_8 config EXAMPLE_PIN_D4 int "D4 GPIO number" default 35 if IDF_TARGET_ESP32S3 default 45 if IDF_TARGET_ESP32P4 config EXAMPLE_PIN_D5 int "D5 GPIO number" default 40 if IDF_TARGET_ESP32S3 default 46 if IDF_TARGET_ESP32P4 config EXAMPLE_PIN_D6 int "D6 GPIO number" default 42 if IDF_TARGET_ESP32S3 default 47 if IDF_TARGET_ESP32P4 config EXAMPLE_PIN_D7 int "D7 GPIO number" default 41 if IDF_TARGET_ESP32S3 default 48 if IDF_TARGET_ESP32P4 endif # EXAMPLE_SDMMC_BUS_WIDTH_8 endif # SOC_SDMMC_USE_GPIO_MATRIX endif # EXAMPLE_USE_SDMMC if EXAMPLE_USE_SDSPI config EXAMPLE_PIN_MOSI int "MOSI GPIO number" default 15 if IDF_TARGET_ESP32 default 35 if IDF_TARGET_ESP32S2 default 35 if IDF_TARGET_ESP32S3 default 5 if IDF_TARGET_ESP32H2 default 36 if IDF_TARGET_ESP32P4 default 4 # C3 and others config EXAMPLE_PIN_MISO int "MISO GPIO number" default 2 if IDF_TARGET_ESP32 default 37 if IDF_TARGET_ESP32S2 default 37 if IDF_TARGET_ESP32S3 default 0 if IDF_TARGET_ESP32H2 default 47 if IDF_TARGET_ESP32P4 default 6 # C3 and others config EXAMPLE_PIN_CLK int "CLK GPIO number" default 14 if IDF_TARGET_ESP32 default 36 if IDF_TARGET_ESP32S2 default 36 if IDF_TARGET_ESP32S3 default 4 if IDF_TARGET_ESP32H2 default 53 if IDF_TARGET_ESP32P4 default 5 # C3 and others config EXAMPLE_PIN_CS int "CS GPIO number" default 13 if IDF_TARGET_ESP32 default 34 if IDF_TARGET_ESP32S2 default 34 if IDF_TARGET_ESP32S3 default 33 if IDF_TARGET_ESP32P4 default 1 # C3 and others endif # EXAMPLE_USE_SDSPI 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. choice prompt "The maximum size of the chunks a SDMMC read/write to/from an unaligned buffer will be split into" default SD_UNALIGNED_MULTI_BLOCK_RW_MAX_CHUNK_SIZE_32 help The maximum size in blocks of the chunks a SDMMC read/write with an unaligned buffer will be split into. The SDMMC driver requires aligned buffers for DMA access. If unaligned buffers are passed and the host's dma_aligned_buffer is NULL, an aligned temporary buffer must be allocated for the actual transfer. This option defines the maximum size for the temporary buffer, which equals this option's value multiplied with the block size (typically 512 bytes). A value of 16 therefore leads to up to 8192 bytes being allocated on the heap for each transfer. The allocated buffer will never be larger than the number of bytes to transfer in total. It also decides whether single (value == 1) or multi block read/write (value > 1) commands are used. With the default value of 1, single-block read/write commands will be used with the allocated buffer size matching the block size. You should keep this option at 1 if your card or configuration doesn't support the read or write multiple blocks commands (CMD18 & CMD25). config SD_UNALIGNED_MULTI_BLOCK_RW_MAX_CHUNK_SIZE_1 bool "1" config SD_UNALIGNED_MULTI_BLOCK_RW_MAX_CHUNK_SIZE_2 bool "2" config SD_UNALIGNED_MULTI_BLOCK_RW_MAX_CHUNK_SIZE_4 bool "4" config SD_UNALIGNED_MULTI_BLOCK_RW_MAX_CHUNK_SIZE_8 bool "8" config SD_UNALIGNED_MULTI_BLOCK_RW_MAX_CHUNK_SIZE_16 bool "16" config SD_UNALIGNED_MULTI_BLOCK_RW_MAX_CHUNK_SIZE_32 bool "32" endchoice config EXAMPLE_SD_UNALIGNED_MULTI_BLOCK_RW_MAX_CHUNK_SIZE int default 1 if SD_UNALIGNED_MULTI_BLOCK_RW_MAX_CHUNK_SIZE_1 default 2 if SD_UNALIGNED_MULTI_BLOCK_RW_MAX_CHUNK_SIZE_2 default 4 if SD_UNALIGNED_MULTI_BLOCK_RW_MAX_CHUNK_SIZE_4 default 8 if SD_UNALIGNED_MULTI_BLOCK_RW_MAX_CHUNK_SIZE_8 default 16 if SD_UNALIGNED_MULTI_BLOCK_RW_MAX_CHUNK_SIZE_16 default 32 if SD_UNALIGNED_MULTI_BLOCK_RW_MAX_CHUNK_SIZE_32 default 1 endmenu # "SD card test config" endmenu # "Performance Monitor Example Configuration"