2019-01-08 05:29:25 -05:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <freertos/FreeRTOS.h>
|
|
|
|
#include <freertos/task.h>
|
|
|
|
#include <freertos/semphr.h>
|
|
|
|
|
|
|
|
#include <unity.h>
|
|
|
|
#include "esp_flash.h"
|
2022-05-17 22:45:06 -04:00
|
|
|
#include "esp_private/spi_common_internal.h"
|
2022-10-14 08:15:32 -04:00
|
|
|
#include "spi_flash_mmap.h"
|
2019-06-24 00:56:39 -04:00
|
|
|
#include "esp_flash_spi_init.h"
|
2020-05-07 02:46:41 -04:00
|
|
|
#include "memspi_host_driver.h"
|
2019-01-08 05:29:25 -05:00
|
|
|
#include <esp_attr.h>
|
|
|
|
#include "esp_log.h"
|
|
|
|
|
2022-08-22 22:10:32 -04:00
|
|
|
|
2019-01-08 05:29:25 -05:00
|
|
|
#include <test_utils.h>
|
|
|
|
|
|
|
|
#include "unity.h"
|
|
|
|
#include "driver/gpio.h"
|
|
|
|
#include "soc/io_mux_reg.h"
|
2019-09-04 09:09:30 -04:00
|
|
|
#include "sdkconfig.h"
|
2019-01-08 05:29:25 -05:00
|
|
|
|
2020-05-11 14:32:40 -04:00
|
|
|
#include "ccomp_timer.h"
|
2020-06-19 00:00:58 -04:00
|
|
|
#include "esp_rom_gpio.h"
|
2020-07-21 01:07:34 -04:00
|
|
|
#include "esp_rom_sys.h"
|
2020-12-15 22:50:13 -05:00
|
|
|
#include "esp_timer.h"
|
2019-11-27 20:20:00 -05:00
|
|
|
|
2020-12-17 23:57:55 -05:00
|
|
|
#if CONFIG_IDF_TARGET_ESP32S2
|
|
|
|
#include "esp32s2/rom/cache.h"
|
|
|
|
#elif CONFIG_IDF_TARGET_ESP32S3
|
|
|
|
#include "esp32s3/rom/cache.h"
|
|
|
|
#elif CONFIG_IDF_TARGET_ESP32C3
|
|
|
|
#include "esp32c3/rom/cache.h"
|
2022-10-19 03:57:24 -04:00
|
|
|
#elif CONFIG_IDF_TARGET_ESP32H4
|
|
|
|
#include "esp32h4/rom/cache.h"
|
2022-01-17 21:32:56 -05:00
|
|
|
#elif CONFIG_IDF_TARGET_ESP32C2
|
|
|
|
#include "esp32c2/rom/cache.h"
|
2020-12-17 23:57:55 -05:00
|
|
|
#endif
|
|
|
|
|
2019-01-08 05:29:25 -05:00
|
|
|
#define FUNC_SPI 1
|
|
|
|
|
2020-08-22 22:40:07 -04:00
|
|
|
#define MAX_ADDR_24BIT 0x1000000
|
2022-04-12 04:37:40 -04:00
|
|
|
#define TEST_SPI_SPEED 10
|
2019-01-08 05:29:25 -05:00
|
|
|
#define TEST_SPI_READ_MODE SPI_FLASH_FASTRD
|
2019-11-27 20:20:00 -05:00
|
|
|
// #define FORCE_GPIO_MATRIX
|
2019-01-08 05:29:25 -05:00
|
|
|
|
2020-04-03 11:52:07 -04:00
|
|
|
#if CONFIG_IDF_TARGET_ESP32
|
2019-09-04 09:09:30 -04:00
|
|
|
#define EXTRA_SPI1_CLK_IO 17 //the pin which is usually used by the PSRAM clk
|
2020-04-03 11:52:07 -04:00
|
|
|
#define SPI1_CS_IO 16 //the pin which is usually used by the PSRAM cs
|
2019-09-04 09:09:30 -04:00
|
|
|
|
2019-01-08 05:29:25 -05:00
|
|
|
#define HSPI_PIN_NUM_MOSI HSPI_IOMUX_PIN_NUM_MOSI
|
|
|
|
#define HSPI_PIN_NUM_MISO HSPI_IOMUX_PIN_NUM_MISO
|
|
|
|
#define HSPI_PIN_NUM_CLK HSPI_IOMUX_PIN_NUM_CLK
|
|
|
|
#define HSPI_PIN_NUM_HD HSPI_IOMUX_PIN_NUM_HD
|
|
|
|
#define HSPI_PIN_NUM_WP HSPI_IOMUX_PIN_NUM_WP
|
2019-11-27 20:20:00 -05:00
|
|
|
#define HSPI_PIN_NUM_CS HSPI_IOMUX_PIN_NUM_CS
|
2019-06-24 00:56:39 -04:00
|
|
|
|
2019-01-08 05:29:25 -05:00
|
|
|
#define VSPI_PIN_NUM_MOSI VSPI_IOMUX_PIN_NUM_MOSI
|
|
|
|
#define VSPI_PIN_NUM_MISO VSPI_IOMUX_PIN_NUM_MISO
|
|
|
|
#define VSPI_PIN_NUM_CLK VSPI_IOMUX_PIN_NUM_CLK
|
|
|
|
#define VSPI_PIN_NUM_HD VSPI_IOMUX_PIN_NUM_HD
|
|
|
|
#define VSPI_PIN_NUM_WP VSPI_IOMUX_PIN_NUM_WP
|
2019-11-27 20:20:00 -05:00
|
|
|
#define VSPI_PIN_NUM_CS VSPI_IOMUX_PIN_NUM_CS
|
2020-04-03 11:52:07 -04:00
|
|
|
|
2020-01-16 22:47:08 -05:00
|
|
|
#elif CONFIG_IDF_TARGET_ESP32S2
|
2020-04-03 11:52:07 -04:00
|
|
|
#define SPI1_CS_IO 26 //the pin which is usually used by the PSRAM cs
|
|
|
|
#define SPI1_HD_IO 27 //the pin which is usually used by the PSRAM hd
|
|
|
|
#define SPI1_WP_IO 28 //the pin which is usually used by the PSRAM wp
|
|
|
|
|
|
|
|
#define FSPI_PIN_NUM_MOSI 35
|
|
|
|
#define FSPI_PIN_NUM_MISO 37
|
|
|
|
#define FSPI_PIN_NUM_CLK 36
|
|
|
|
#define FSPI_PIN_NUM_HD 33
|
|
|
|
#define FSPI_PIN_NUM_WP 38
|
|
|
|
#define FSPI_PIN_NUM_CS 34
|
|
|
|
|
2020-08-18 05:11:46 -04:00
|
|
|
// Just use the same pins for HSPI
|
|
|
|
#define HSPI_PIN_NUM_MOSI FSPI_PIN_NUM_MOSI
|
|
|
|
#define HSPI_PIN_NUM_MISO FSPI_PIN_NUM_MISO
|
|
|
|
#define HSPI_PIN_NUM_CLK FSPI_PIN_NUM_CLK
|
|
|
|
#define HSPI_PIN_NUM_HD FSPI_PIN_NUM_HD
|
|
|
|
#define HSPI_PIN_NUM_WP FSPI_PIN_NUM_WP
|
|
|
|
#define HSPI_PIN_NUM_CS FSPI_PIN_NUM_CS
|
|
|
|
|
|
|
|
#elif CONFIG_IDF_TARGET_ESP32S3
|
|
|
|
#define SPI1_CS_IO 26 //the pin which is usually used by the PSRAM cs
|
|
|
|
#define SPI1_HD_IO 27 //the pin which is usually used by the PSRAM hd
|
|
|
|
#define SPI1_WP_IO 28 //the pin which is usually used by the PSRAM wp
|
|
|
|
|
2021-06-21 07:43:51 -04:00
|
|
|
#define FSPI_PIN_NUM_MOSI 11
|
|
|
|
#define FSPI_PIN_NUM_MISO 13
|
|
|
|
#define FSPI_PIN_NUM_CLK 12
|
|
|
|
#define FSPI_PIN_NUM_HD 9
|
|
|
|
#define FSPI_PIN_NUM_WP 14
|
|
|
|
#define FSPI_PIN_NUM_CS 10
|
2020-08-18 05:11:46 -04:00
|
|
|
|
2020-12-15 22:50:13 -05:00
|
|
|
// Just use the same pins for HSPI
|
|
|
|
#define HSPI_PIN_NUM_MOSI FSPI_PIN_NUM_MOSI
|
|
|
|
#define HSPI_PIN_NUM_MISO FSPI_PIN_NUM_MISO
|
|
|
|
#define HSPI_PIN_NUM_CLK FSPI_PIN_NUM_CLK
|
|
|
|
#define HSPI_PIN_NUM_HD FSPI_PIN_NUM_HD
|
|
|
|
#define HSPI_PIN_NUM_WP FSPI_PIN_NUM_WP
|
|
|
|
#define HSPI_PIN_NUM_CS FSPI_PIN_NUM_CS
|
|
|
|
|
2022-04-12 04:37:40 -04:00
|
|
|
#elif CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C2
|
2020-12-15 22:50:13 -05:00
|
|
|
#define SPI1_CS_IO 26 //the pin which is usually used by the PSRAM cs
|
|
|
|
#define SPI1_HD_IO 27 //the pin which is usually used by the PSRAM hd
|
|
|
|
#define SPI1_WP_IO 28 //the pin which is usually used by the PSRAM wp
|
|
|
|
|
|
|
|
#define FSPI_PIN_NUM_MOSI 7
|
|
|
|
#define FSPI_PIN_NUM_MISO 2
|
|
|
|
#define FSPI_PIN_NUM_CLK 6
|
|
|
|
#define FSPI_PIN_NUM_HD 4
|
|
|
|
#define FSPI_PIN_NUM_WP 5
|
|
|
|
#define FSPI_PIN_NUM_CS 10
|
|
|
|
|
2020-04-03 11:52:07 -04:00
|
|
|
// Just use the same pins for HSPI
|
2019-11-27 20:20:00 -05:00
|
|
|
#define HSPI_PIN_NUM_MOSI FSPI_PIN_NUM_MOSI
|
|
|
|
#define HSPI_PIN_NUM_MISO FSPI_PIN_NUM_MISO
|
|
|
|
#define HSPI_PIN_NUM_CLK FSPI_PIN_NUM_CLK
|
|
|
|
#define HSPI_PIN_NUM_HD FSPI_PIN_NUM_HD
|
|
|
|
#define HSPI_PIN_NUM_WP FSPI_PIN_NUM_WP
|
|
|
|
#define HSPI_PIN_NUM_CS FSPI_PIN_NUM_CS
|
|
|
|
#endif
|
2019-06-24 00:56:39 -04:00
|
|
|
|
2023-01-10 00:59:46 -05:00
|
|
|
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C6, ESP32H2)
|
2020-02-24 22:56:13 -05:00
|
|
|
#define TEST_CONFIG_NUM (sizeof(config_list)/sizeof(flashtest_config_t))
|
|
|
|
|
2020-08-22 22:40:07 -04:00
|
|
|
typedef void (*flash_test_func_t)(const esp_partition_t *part);
|
2019-01-08 05:29:25 -05:00
|
|
|
|
2022-05-20 06:16:47 -04:00
|
|
|
/* Use TEST_CASE_FLASH for SPI flash tests that only use the main SPI flash chip
|
2020-02-24 22:56:13 -05:00
|
|
|
*/
|
2022-05-20 06:16:47 -04:00
|
|
|
#define TEST_CASE_FLASH(STR, FUNC_TO_RUN) \
|
2020-02-24 22:56:13 -05:00
|
|
|
TEST_CASE(STR, "[esp_flash]") {flash_test_func(FUNC_TO_RUN, 1 /* first index reserved for main flash */ );}
|
|
|
|
|
2022-05-20 06:16:47 -04:00
|
|
|
#define TEST_CASE_FLASH_IGNORE(STR, FUNC_TO_RUN) \
|
2020-04-02 05:30:08 -04:00
|
|
|
TEST_CASE(STR, "[esp_flash][ignore]") {flash_test_func(FUNC_TO_RUN, 1 /* first index reserved for main flash */ );}
|
|
|
|
|
2022-05-20 06:16:47 -04:00
|
|
|
/* Use TEST_CASE_MULTI_FLASH for tests which also run on external flash, which sits in the place of PSRAM
|
2020-02-24 22:56:13 -05:00
|
|
|
(these tests are incompatible with PSRAM)
|
|
|
|
|
|
|
|
These tests run for all the flash chip configs shown in config_list, below (internal and external).
|
|
|
|
*/
|
2022-05-20 06:16:47 -04:00
|
|
|
|
|
|
|
|
2021-06-21 07:43:51 -04:00
|
|
|
#if defined(CONFIG_SPIRAM)
|
2022-05-20 06:16:47 -04:00
|
|
|
//SPI1 CS1 occupied by PSRAM
|
|
|
|
#define BYPASS_MULTIPLE_CHIP 1
|
|
|
|
#endif
|
2020-04-02 05:30:08 -04:00
|
|
|
|
2022-05-20 06:16:47 -04:00
|
|
|
#if CONFIG_IDF_TARGET_ESP32C2 || CONFIG_IDF_TARGET_ESP32C3
|
|
|
|
//chips without PSRAM
|
|
|
|
#define TEST_CHIP_NUM 2
|
|
|
|
#elif CONFIG_IDF_TARGET_ESP32 || CONFIG_IDF_TARGET_ESP32S2 || CONFIG_IDF_TARGET_ESP32S3
|
|
|
|
#define TEST_CHIP_NUM 3
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define _STRINGIFY(s) #s
|
|
|
|
#define STRINGIFY(s) _STRINGIFY(s)
|
|
|
|
#define TEST_CHIP_NUM_STR STRINGIFY(TEST_CHIP_NUM)
|
2021-01-22 05:04:27 -05:00
|
|
|
|
2022-05-20 06:16:47 -04:00
|
|
|
#if BYPASS_MULTIPLE_CHIP
|
|
|
|
#define TEST_CASE_MULTI_FLASH TEST_CASE_MULTI_FLASH_IGNORE
|
|
|
|
#else
|
2022-06-19 07:04:44 -04:00
|
|
|
#if CONFIG_FREERTOS_SMP // IDF-5260
|
|
|
|
#define TEST_CASE_MULTI_FLASH(STR, FUNC_TO_RUN) \
|
2022-08-22 22:10:32 -04:00
|
|
|
TEST_CASE(STR", "TEST_CHIP_NUM_STR" chips", "[esp_flash_multi][test_env=UT_T1_ESP_FLASH][timeout=60]") {flash_test_func(FUNC_TO_RUN, TEST_CONFIG_NUM);}
|
2022-06-19 07:04:44 -04:00
|
|
|
#else
|
2022-05-20 06:16:47 -04:00
|
|
|
#define TEST_CASE_MULTI_FLASH(STR, FUNC_TO_RUN) \
|
2022-08-22 22:10:32 -04:00
|
|
|
TEST_CASE(STR", "TEST_CHIP_NUM_STR" chips", "[esp_flash_multi][test_env=UT_T1_ESP_FLASH][timeout=35]") {flash_test_func(FUNC_TO_RUN, TEST_CONFIG_NUM);}
|
2022-05-20 06:16:47 -04:00
|
|
|
#endif
|
2022-06-19 07:04:44 -04:00
|
|
|
#endif
|
2022-05-20 06:16:47 -04:00
|
|
|
|
|
|
|
#define TEST_CASE_MULTI_FLASH_IGNORE(STR, FUNC_TO_RUN) \
|
2022-08-22 22:10:32 -04:00
|
|
|
TEST_CASE(STR", "TEST_CHIP_NUM_STR" chips", "[esp_flash_multi][test_env=UT_T1_ESP_FLASH][ignore]") {flash_test_func(FUNC_TO_RUN, TEST_CONFIG_NUM);}
|
2019-01-08 05:29:25 -05:00
|
|
|
|
2021-03-25 05:36:17 -04:00
|
|
|
|
2019-09-04 09:09:30 -04:00
|
|
|
//currently all the configs are the same with esp_flash_spi_device_config_t, no more information required
|
|
|
|
typedef esp_flash_spi_device_config_t flashtest_config_t;
|
2019-01-08 05:29:25 -05:00
|
|
|
|
|
|
|
static const char TAG[] = "test_esp_flash";
|
|
|
|
|
2019-11-27 20:20:00 -05:00
|
|
|
#define FLASHTEST_CONFIG_COMMON \
|
|
|
|
/* 0 always reserved for main flash */ \
|
|
|
|
{ \
|
|
|
|
/* no need to init */ \
|
|
|
|
.host_id = -1, \
|
2020-04-03 11:52:07 -04:00
|
|
|
} \
|
|
|
|
, \
|
2019-11-27 20:20:00 -05:00
|
|
|
{ \
|
|
|
|
.io_mode = TEST_SPI_READ_MODE,\
|
2022-04-12 04:37:40 -04:00
|
|
|
.freq_mhz = TEST_SPI_SPEED, \
|
2021-03-05 03:20:33 -05:00
|
|
|
.host_id = SPI1_HOST, \
|
2019-11-27 20:20:00 -05:00
|
|
|
.cs_id = 1, \
|
|
|
|
/* the pin which is usually used by the PSRAM */ \
|
2020-04-03 11:52:07 -04:00
|
|
|
.cs_io_num = SPI1_CS_IO, \
|
2019-11-27 20:20:00 -05:00
|
|
|
.input_delay_ns = 0, \
|
2020-01-02 01:25:33 -05:00
|
|
|
}
|
2019-11-27 20:20:00 -05:00
|
|
|
|
|
|
|
#if CONFIG_IDF_TARGET_ESP32
|
2019-09-04 09:09:30 -04:00
|
|
|
flashtest_config_t config_list[] = {
|
2019-11-27 20:20:00 -05:00
|
|
|
FLASHTEST_CONFIG_COMMON,
|
|
|
|
/* current runner doesn't have a flash on HSPI */
|
|
|
|
// {
|
|
|
|
// .io_mode = TEST_SPI_READ_MODE,
|
2022-04-12 04:37:40 -04:00
|
|
|
// .freq_mhz = TEST_SPI_SPEED,
|
2019-11-27 20:20:00 -05:00
|
|
|
// .host_id = HSPI_HOST,
|
|
|
|
// .cs_id = 0,
|
2020-08-13 09:34:01 -04:00
|
|
|
// // uses GPIO matrix on esp32s2 regardless if FORCE_GPIO_MATRIX
|
2020-01-02 01:25:33 -05:00
|
|
|
// .cs_io_num = HSPI_PIN_NUM_CS,
|
2019-11-27 20:20:00 -05:00
|
|
|
// .input_delay_ns = 20,
|
|
|
|
// },
|
2019-09-04 09:09:30 -04:00
|
|
|
{
|
|
|
|
.io_mode = TEST_SPI_READ_MODE,
|
2022-04-12 04:37:40 -04:00
|
|
|
.freq_mhz = TEST_SPI_SPEED,
|
2019-09-04 09:09:30 -04:00
|
|
|
.host_id = VSPI_HOST,
|
|
|
|
.cs_id = 0,
|
2020-01-02 01:25:33 -05:00
|
|
|
.cs_io_num = VSPI_PIN_NUM_CS,
|
2019-09-04 09:09:30 -04:00
|
|
|
.input_delay_ns = 0,
|
|
|
|
},
|
|
|
|
};
|
2020-01-16 22:47:08 -05:00
|
|
|
#elif CONFIG_IDF_TARGET_ESP32S2
|
2019-11-27 20:20:00 -05:00
|
|
|
flashtest_config_t config_list[] = {
|
|
|
|
FLASHTEST_CONFIG_COMMON,
|
2020-04-03 11:52:07 -04:00
|
|
|
{
|
|
|
|
.io_mode = TEST_SPI_READ_MODE,
|
2022-04-12 04:37:40 -04:00
|
|
|
.freq_mhz = TEST_SPI_SPEED,
|
2020-04-03 11:52:07 -04:00
|
|
|
.host_id = FSPI_HOST,
|
|
|
|
.cs_id = 0,
|
|
|
|
.cs_io_num = FSPI_PIN_NUM_CS,
|
|
|
|
.input_delay_ns = 0,
|
|
|
|
},
|
2020-08-13 09:34:01 -04:00
|
|
|
{
|
|
|
|
.io_mode = TEST_SPI_READ_MODE,
|
2022-04-12 04:37:40 -04:00
|
|
|
.freq_mhz = TEST_SPI_SPEED,
|
2020-08-13 09:34:01 -04:00
|
|
|
.host_id = HSPI_HOST,
|
|
|
|
.cs_id = 0,
|
|
|
|
// uses GPIO matrix on esp32s2 regardless of FORCE_GPIO_MATRIX
|
|
|
|
.cs_io_num = HSPI_PIN_NUM_CS,
|
|
|
|
.input_delay_ns = 0,
|
|
|
|
},
|
2019-11-27 20:20:00 -05:00
|
|
|
};
|
2020-08-18 05:11:46 -04:00
|
|
|
#elif CONFIG_IDF_TARGET_ESP32S3
|
|
|
|
flashtest_config_t config_list[] = {
|
2021-06-21 07:43:51 -04:00
|
|
|
/* No SPI1 CS1 flash on esp32S3 test */
|
|
|
|
{
|
|
|
|
/* no need to init */
|
|
|
|
.host_id = -1,
|
|
|
|
},
|
2020-12-15 22:50:13 -05:00
|
|
|
{
|
|
|
|
.io_mode = TEST_SPI_READ_MODE,
|
2022-04-12 04:37:40 -04:00
|
|
|
.freq_mhz = TEST_SPI_SPEED,
|
2021-03-05 03:20:33 -05:00
|
|
|
.host_id = SPI2_HOST,
|
2020-12-15 22:50:13 -05:00
|
|
|
.cs_id = 0,
|
|
|
|
.cs_io_num = FSPI_PIN_NUM_CS,
|
|
|
|
.input_delay_ns = 0,
|
|
|
|
},
|
|
|
|
};
|
2022-04-12 04:37:40 -04:00
|
|
|
#elif CONFIG_IDF_TARGET_ESP32C3 || CONFIG_IDF_TARGET_ESP32C2
|
2020-12-15 22:50:13 -05:00
|
|
|
flashtest_config_t config_list[] = {
|
2021-02-04 01:37:07 -05:00
|
|
|
/* No SPI1 CS1 flash on esp32c3 test */
|
2021-01-22 05:04:27 -05:00
|
|
|
{
|
|
|
|
/* no need to init */
|
|
|
|
.host_id = -1,
|
|
|
|
},
|
2020-08-18 05:11:46 -04:00
|
|
|
{
|
|
|
|
.io_mode = TEST_SPI_READ_MODE,
|
2022-04-12 04:37:40 -04:00
|
|
|
.freq_mhz = TEST_SPI_SPEED,
|
2021-03-05 03:20:33 -05:00
|
|
|
.host_id = SPI2_HOST,
|
2020-08-18 05:11:46 -04:00
|
|
|
.cs_id = 0,
|
|
|
|
.cs_io_num = FSPI_PIN_NUM_CS,
|
|
|
|
.input_delay_ns = 0,
|
|
|
|
},
|
|
|
|
};
|
2019-11-27 20:20:00 -05:00
|
|
|
#endif
|
2019-01-08 05:29:25 -05:00
|
|
|
|
2020-05-11 14:32:40 -04:00
|
|
|
static void get_chip_host(esp_flash_t* chip, spi_host_device_t* out_host_id, int* out_cs_id)
|
|
|
|
{
|
|
|
|
spi_host_device_t host_id;
|
|
|
|
int cs_id;
|
|
|
|
if (chip == NULL) {
|
2021-03-05 03:20:33 -05:00
|
|
|
host_id = SPI1_HOST;
|
2020-05-11 14:32:40 -04:00
|
|
|
cs_id = 0;
|
|
|
|
} else {
|
2020-05-07 02:46:41 -04:00
|
|
|
spi_flash_hal_context_t* host_data = (spi_flash_hal_context_t*)chip->host;
|
|
|
|
host_id = spi_flash_ll_hw_get_id(host_data->spi);
|
|
|
|
cs_id = host_data->cs_num;
|
2020-05-11 14:32:40 -04:00
|
|
|
}
|
|
|
|
if (out_host_id) {
|
|
|
|
*out_host_id = host_id;
|
|
|
|
}
|
|
|
|
if (out_cs_id) {
|
|
|
|
*out_cs_id = cs_id;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-04-09 02:42:56 -04:00
|
|
|
#if CONFIG_IDF_TARGET_ESP32
|
2019-06-24 00:56:39 -04:00
|
|
|
static void setup_bus(spi_host_device_t host_id)
|
2019-01-08 05:29:25 -05:00
|
|
|
{
|
2021-03-05 03:20:33 -05:00
|
|
|
if (host_id == SPI1_HOST) {
|
2019-06-24 00:56:39 -04:00
|
|
|
ESP_LOGI(TAG, "setup flash on SPI1 CS1...\n");
|
|
|
|
//no need to initialize the bus, however the CLK may need one more output if it's on the usual place of PSRAM
|
2020-06-19 00:00:58 -04:00
|
|
|
esp_rom_gpio_connect_out_signal(EXTRA_SPI1_CLK_IO, SPICLK_OUT_IDX, 0, 0);
|
2021-04-09 02:42:56 -04:00
|
|
|
//currently the SPI bus for main flash chip is initialized through GPIO matrix
|
|
|
|
} else if (host_id == SPI2_HOST) {
|
|
|
|
ESP_LOGI(TAG, "setup flash on SPI%d (HSPI) CS0...\n", host_id + 1);
|
|
|
|
spi_bus_config_t hspi_bus_cfg = {
|
|
|
|
.mosi_io_num = HSPI_PIN_NUM_MOSI,
|
|
|
|
.miso_io_num = HSPI_PIN_NUM_MISO,
|
|
|
|
.sclk_io_num = HSPI_PIN_NUM_CLK,
|
|
|
|
.quadhd_io_num = HSPI_PIN_NUM_HD,
|
|
|
|
.quadwp_io_num = HSPI_PIN_NUM_WP,
|
|
|
|
.max_transfer_sz = 64,
|
|
|
|
};
|
|
|
|
esp_err_t ret = spi_bus_initialize(host_id, &hspi_bus_cfg, 0);
|
|
|
|
TEST_ESP_OK(ret);
|
|
|
|
} else if (host_id == SPI3_HOST) {
|
|
|
|
ESP_LOGI(TAG, "setup flash on SPI%d (VSPI) CS0...\n", host_id + 1);
|
|
|
|
spi_bus_config_t vspi_bus_cfg = {
|
|
|
|
.mosi_io_num = VSPI_PIN_NUM_MOSI,
|
|
|
|
.miso_io_num = VSPI_PIN_NUM_MISO,
|
|
|
|
.sclk_io_num = VSPI_PIN_NUM_CLK,
|
|
|
|
.quadhd_io_num = VSPI_PIN_NUM_HD,
|
|
|
|
.quadwp_io_num = VSPI_PIN_NUM_WP,
|
|
|
|
.max_transfer_sz = 64,
|
|
|
|
};
|
|
|
|
esp_err_t ret = spi_bus_initialize(host_id, &vspi_bus_cfg, 0);
|
|
|
|
TEST_ESP_OK(ret);
|
|
|
|
} else {
|
|
|
|
ESP_LOGE(TAG, "invalid bus");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#else // FOR ESP32-S2, ESP32-S3, ESP32-C3
|
|
|
|
static void setup_bus(spi_host_device_t host_id)
|
|
|
|
{
|
|
|
|
if (host_id == SPI1_HOST) {
|
|
|
|
ESP_LOGI(TAG, "setup flash on SPI1 CS1...\n");
|
2020-04-03 11:52:07 -04:00
|
|
|
#if !CONFIG_ESPTOOLPY_FLASHMODE_QIO && !CONFIG_ESPTOOLPY_FLASHMODE_QOUT
|
|
|
|
//Initialize the WP and HD pins, which are not automatically initialized on ESP32-S2.
|
|
|
|
int wp_pin = spi_periph_signal[host_id].spiwp_iomux_pin;
|
|
|
|
int hd_pin = spi_periph_signal[host_id].spihd_iomux_pin;
|
|
|
|
gpio_iomux_in(wp_pin, spi_periph_signal[host_id].spiwp_in);
|
|
|
|
gpio_iomux_out(wp_pin, spi_periph_signal[host_id].func, false);
|
|
|
|
gpio_iomux_in(hd_pin, spi_periph_signal[host_id].spihd_in);
|
|
|
|
gpio_iomux_out(hd_pin, spi_periph_signal[host_id].func, false);
|
|
|
|
#endif //CONFIG_ESPTOOLPY_FLASHMODE_QIO || CONFIG_ESPTOOLPY_FLASHMODE_QOUT
|
2021-04-09 02:42:56 -04:00
|
|
|
//currently the SPI bus for main flash chip is initialized through GPIO matrix
|
2022-12-12 02:09:22 -05:00
|
|
|
}
|
|
|
|
else if (host_id == SPI2_HOST) {
|
2019-11-27 20:20:00 -05:00
|
|
|
ESP_LOGI(TAG, "setup flash on SPI%d (FSPI) CS0...\n", host_id + 1);
|
|
|
|
spi_bus_config_t fspi_bus_cfg = {
|
|
|
|
.mosi_io_num = FSPI_PIN_NUM_MOSI,
|
|
|
|
.miso_io_num = FSPI_PIN_NUM_MISO,
|
|
|
|
.sclk_io_num = FSPI_PIN_NUM_CLK,
|
|
|
|
.quadhd_io_num = FSPI_PIN_NUM_HD,
|
|
|
|
.quadwp_io_num = FSPI_PIN_NUM_WP,
|
|
|
|
.max_transfer_sz = 64,
|
|
|
|
};
|
|
|
|
esp_err_t ret = spi_bus_initialize(host_id, &fspi_bus_cfg, 0);
|
|
|
|
TEST_ESP_OK(ret);
|
2022-12-12 02:09:22 -05:00
|
|
|
}
|
|
|
|
#if SOC_SPI_PERIPH_NUM > 2
|
|
|
|
else if (host_id == SPI3_HOST) {
|
2019-11-27 20:20:00 -05:00
|
|
|
ESP_LOGI(TAG, "setup flash on SPI%d (HSPI) CS0...\n", host_id + 1);
|
2019-06-24 00:56:39 -04:00
|
|
|
spi_bus_config_t hspi_bus_cfg = {
|
|
|
|
.mosi_io_num = HSPI_PIN_NUM_MOSI,
|
|
|
|
.miso_io_num = HSPI_PIN_NUM_MISO,
|
|
|
|
.sclk_io_num = HSPI_PIN_NUM_CLK,
|
|
|
|
.quadhd_io_num = HSPI_PIN_NUM_HD,
|
|
|
|
.quadwp_io_num = HSPI_PIN_NUM_WP,
|
|
|
|
.max_transfer_sz = 64,
|
|
|
|
};
|
|
|
|
esp_err_t ret = spi_bus_initialize(host_id, &hspi_bus_cfg, 0);
|
|
|
|
TEST_ESP_OK(ret);
|
2019-11-27 20:20:00 -05:00
|
|
|
|
|
|
|
// HSPI have no multiline mode, use GPIO to pull those pins up
|
|
|
|
gpio_set_direction(HSPI_PIN_NUM_HD, GPIO_MODE_OUTPUT);
|
|
|
|
gpio_set_level(HSPI_PIN_NUM_HD, 1);
|
|
|
|
|
|
|
|
gpio_set_direction(HSPI_PIN_NUM_WP, GPIO_MODE_OUTPUT);
|
|
|
|
gpio_set_level(HSPI_PIN_NUM_WP, 1);
|
2022-12-12 02:09:22 -05:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
else {
|
2019-06-24 00:56:39 -04:00
|
|
|
ESP_LOGE(TAG, "invalid bus");
|
2019-01-08 05:29:25 -05:00
|
|
|
}
|
|
|
|
}
|
2021-04-09 02:42:56 -04:00
|
|
|
#endif // CONFIG_IDF_TARGET_ESP32
|
2019-01-08 05:29:25 -05:00
|
|
|
|
2019-06-24 00:56:39 -04:00
|
|
|
static void release_bus(int host_id)
|
2019-01-08 05:29:25 -05:00
|
|
|
{
|
2020-01-21 05:35:24 -05:00
|
|
|
//SPI1 bus can't be deinitialized
|
2022-12-12 02:09:22 -05:00
|
|
|
#if SOC_SPI_PERIPH_NUM > 2
|
|
|
|
if (host_id == SPI2_HOST || host_id == SPI3_HOST)
|
|
|
|
#else
|
|
|
|
if (host_id == SPI2_HOST)
|
|
|
|
#endif
|
|
|
|
{
|
2019-06-24 00:56:39 -04:00
|
|
|
spi_bus_free(host_id);
|
|
|
|
}
|
|
|
|
}
|
2019-01-08 05:29:25 -05:00
|
|
|
|
2019-09-04 09:09:30 -04:00
|
|
|
static void setup_new_chip(const flashtest_config_t* test_cfg, esp_flash_t** out_chip)
|
2019-06-24 00:56:39 -04:00
|
|
|
{
|
|
|
|
//the bus should be initialized before the flash is attached to the bus
|
2019-09-04 09:09:30 -04:00
|
|
|
if (test_cfg->host_id == -1) {
|
|
|
|
*out_chip = NULL;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
setup_bus(test_cfg->host_id);
|
2019-01-08 05:29:25 -05:00
|
|
|
|
2019-06-24 00:56:39 -04:00
|
|
|
esp_flash_spi_device_config_t dev_cfg = {
|
2019-09-04 09:09:30 -04:00
|
|
|
.host_id = test_cfg->host_id,
|
|
|
|
.io_mode = test_cfg->io_mode,
|
2022-04-12 04:37:40 -04:00
|
|
|
.freq_mhz = test_cfg->freq_mhz,
|
2019-09-04 09:09:30 -04:00
|
|
|
.cs_id = test_cfg->cs_id,
|
|
|
|
.cs_io_num = test_cfg->cs_io_num,
|
|
|
|
.input_delay_ns = test_cfg->input_delay_ns,
|
2019-01-08 05:29:25 -05:00
|
|
|
};
|
2019-09-04 09:09:30 -04:00
|
|
|
esp_flash_t* init_chip;
|
|
|
|
esp_err_t err = spi_bus_add_flash_device(&init_chip, &dev_cfg);
|
2019-01-08 05:29:25 -05:00
|
|
|
TEST_ESP_OK(err);
|
2019-09-04 09:09:30 -04:00
|
|
|
err = esp_flash_init(init_chip);
|
2019-01-08 05:29:25 -05:00
|
|
|
TEST_ESP_OK(err);
|
2019-09-04 09:09:30 -04:00
|
|
|
*out_chip = init_chip;
|
2019-01-08 05:29:25 -05:00
|
|
|
}
|
|
|
|
|
2020-08-22 22:40:07 -04:00
|
|
|
static void teardown_test_chip(esp_flash_t* chip)
|
2019-01-08 05:29:25 -05:00
|
|
|
{
|
2020-08-22 22:40:07 -04:00
|
|
|
spi_host_device_t host_id;
|
|
|
|
get_chip_host(chip, &host_id, NULL);
|
2019-09-04 09:09:30 -04:00
|
|
|
//happen to work when chip==NULL
|
|
|
|
spi_bus_remove_flash_device(chip);
|
2020-08-22 22:40:07 -04:00
|
|
|
release_bus(host_id);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void flash_test_core(flash_test_func_t func, const flashtest_config_t* config)
|
|
|
|
{
|
|
|
|
esp_flash_t* chip;
|
|
|
|
setup_new_chip(config, &chip);
|
|
|
|
|
|
|
|
uint32_t size;
|
|
|
|
esp_err_t err = esp_flash_get_size(chip, &size);
|
|
|
|
TEST_ESP_OK(err);
|
|
|
|
ESP_LOGI(TAG, "Flash size: 0x%08X", size);
|
|
|
|
|
|
|
|
const esp_partition_t* test_part = get_test_data_partition();
|
|
|
|
TEST_ASSERT_NOT_EQUAL(NULL, test_part->flash_chip);
|
|
|
|
|
|
|
|
esp_partition_t part = *test_part;
|
|
|
|
part.flash_chip = chip;
|
|
|
|
|
|
|
|
ESP_LOGI(TAG, "Testing chip %p, address 0x%08X...", part.flash_chip, part.address);
|
|
|
|
(*func)(&part);
|
|
|
|
|
|
|
|
// For flash with size over 16MB, add one extra round of test for the 32-bit address area
|
|
|
|
if (size > MAX_ADDR_24BIT) {
|
|
|
|
part.address = 0x1030000;
|
|
|
|
part.size = 0x0010000;
|
|
|
|
ESP_LOGI(TAG, "Testing chip %p, address 0x%08X...", part.flash_chip, part.address);
|
|
|
|
(*func)(&part);
|
|
|
|
}
|
|
|
|
|
|
|
|
teardown_test_chip(chip);
|
2019-01-08 05:29:25 -05:00
|
|
|
}
|
|
|
|
|
2019-09-04 09:09:30 -04:00
|
|
|
static void flash_test_func(flash_test_func_t func, int test_num)
|
|
|
|
{
|
2020-08-22 22:40:07 -04:00
|
|
|
esp_log_level_set("gpio", ESP_LOG_NONE);
|
2019-09-04 09:09:30 -04:00
|
|
|
for (int i = 0; i < test_num; i++) {
|
2020-08-22 22:40:07 -04:00
|
|
|
ESP_LOGI(TAG, "Testing config %d/%d", i+1, test_num);
|
|
|
|
flash_test_core(func, &config_list[i]);
|
2019-09-04 09:09:30 -04:00
|
|
|
}
|
2020-02-24 22:56:13 -05:00
|
|
|
ESP_LOGI(TAG, "Completed %d configs", test_num);
|
2019-09-04 09:09:30 -04:00
|
|
|
}
|
|
|
|
|
2020-02-24 22:56:13 -05:00
|
|
|
|
2020-05-11 14:32:40 -04:00
|
|
|
typedef struct {
|
|
|
|
uint32_t us_start;
|
|
|
|
size_t len;
|
|
|
|
const char* name;
|
|
|
|
} time_meas_ctx_t;
|
|
|
|
static void time_measure_start(time_meas_ctx_t* ctx)
|
|
|
|
{
|
|
|
|
ctx->us_start = esp_timer_get_time();
|
|
|
|
ccomp_timer_start();
|
|
|
|
}
|
|
|
|
|
|
|
|
static uint32_t time_measure_end(time_meas_ctx_t* ctx)
|
|
|
|
{
|
|
|
|
uint32_t c_time_us = ccomp_timer_stop();
|
|
|
|
uint32_t time_us = esp_timer_get_time() - ctx->us_start;
|
|
|
|
|
|
|
|
ESP_LOGI(TAG, "%s: compensated: %.2lf kB/s, typical: %.2lf kB/s", ctx->name, ctx->len / (c_time_us / 1000.), ctx->len / (time_us/1000.));
|
|
|
|
return ctx->len * 1000 / (c_time_us / 1000);
|
|
|
|
}
|
|
|
|
|
|
|
|
#define TEST_TIMES 20
|
|
|
|
#define TEST_SECTORS 4
|
|
|
|
|
|
|
|
static uint32_t measure_erase(const esp_partition_t* part)
|
|
|
|
{
|
|
|
|
const int total_len = SPI_FLASH_SEC_SIZE * TEST_SECTORS;
|
|
|
|
time_meas_ctx_t time_ctx = {.name = "erase", .len = total_len};
|
|
|
|
|
|
|
|
time_measure_start(&time_ctx);
|
|
|
|
esp_err_t err = esp_flash_erase_region(part->flash_chip, part->address, total_len);
|
|
|
|
TEST_ESP_OK(err);
|
|
|
|
return time_measure_end(&time_ctx);
|
|
|
|
}
|
|
|
|
|
|
|
|
// should called after measure_erase
|
|
|
|
static uint32_t measure_write(const char* name, const esp_partition_t* part, const uint8_t* data_to_write, int seg_len)
|
|
|
|
{
|
|
|
|
const int total_len = SPI_FLASH_SEC_SIZE;
|
|
|
|
time_meas_ctx_t time_ctx = {.name = name, .len = total_len * TEST_TIMES};
|
|
|
|
|
|
|
|
time_measure_start(&time_ctx);
|
|
|
|
for (int i = 0; i < TEST_TIMES; i ++) {
|
|
|
|
// Erase one time, but write 100 times the same data
|
|
|
|
size_t len = total_len;
|
|
|
|
int offset = 0;
|
|
|
|
|
|
|
|
while (len) {
|
|
|
|
int len_write = MIN(seg_len, len);
|
|
|
|
esp_err_t err = esp_flash_write(part->flash_chip, data_to_write + offset, part->address + offset, len_write);
|
|
|
|
TEST_ESP_OK(err);
|
|
|
|
|
|
|
|
offset += len_write;
|
|
|
|
len -= len_write;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return time_measure_end(&time_ctx);
|
|
|
|
}
|
|
|
|
|
|
|
|
static uint32_t measure_read(const char* name, const esp_partition_t* part, uint8_t* data_read, int seg_len)
|
|
|
|
{
|
|
|
|
const int total_len = SPI_FLASH_SEC_SIZE;
|
|
|
|
time_meas_ctx_t time_ctx = {.name = name, .len = total_len * TEST_TIMES};
|
|
|
|
|
|
|
|
time_measure_start(&time_ctx);
|
|
|
|
for (int i = 0; i < TEST_TIMES; i ++) {
|
|
|
|
size_t len = total_len;
|
|
|
|
int offset = 0;
|
|
|
|
|
|
|
|
while (len) {
|
|
|
|
int len_read = MIN(seg_len, len);
|
|
|
|
esp_err_t err = esp_flash_read(part->flash_chip, data_read + offset, part->address + offset, len_read);
|
|
|
|
TEST_ESP_OK(err);
|
|
|
|
|
|
|
|
offset += len_read;
|
|
|
|
len -= len_read;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return time_measure_end(&time_ctx);
|
|
|
|
}
|
|
|
|
|
2021-03-25 05:36:17 -04:00
|
|
|
static const char* get_chip_vendor(uint32_t id)
|
|
|
|
{
|
|
|
|
switch (id)
|
|
|
|
{
|
|
|
|
case 0x20:
|
|
|
|
return "XMC";
|
|
|
|
break;
|
|
|
|
case 0x68:
|
|
|
|
return "BOYA";
|
|
|
|
break;
|
|
|
|
case 0xC8:
|
|
|
|
return "GigaDevice";
|
|
|
|
break;
|
|
|
|
case 0x9D:
|
|
|
|
return "ISSI";
|
|
|
|
break;
|
|
|
|
case 0xC2:
|
|
|
|
return "MXIC";
|
|
|
|
break;
|
|
|
|
case 0xEF:
|
|
|
|
return "Winbond";
|
|
|
|
break;
|
|
|
|
case 0xA1:
|
|
|
|
return "Fudan Micro";
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return "generic";
|
|
|
|
}
|
|
|
|
|
2020-08-22 22:40:07 -04:00
|
|
|
#define MEAS_WRITE(n) (measure_write("write in "#n"-byte chunks", part, data_to_write, n))
|
|
|
|
#define MEAS_READ(n) (measure_read("read in "#n"-byte chunks", part, data_read, n))
|
2020-05-11 14:32:40 -04:00
|
|
|
|
2020-08-22 22:40:07 -04:00
|
|
|
static void test_flash_read_write_performance(const esp_partition_t *part)
|
2020-05-11 14:32:40 -04:00
|
|
|
{
|
2020-08-22 22:40:07 -04:00
|
|
|
esp_flash_t* chip = part->flash_chip;
|
2020-05-11 14:32:40 -04:00
|
|
|
const int total_len = SPI_FLASH_SEC_SIZE;
|
|
|
|
uint8_t *data_to_write = heap_caps_malloc(total_len, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
|
|
|
|
uint8_t *data_read = heap_caps_malloc(total_len, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
|
|
|
|
|
|
|
|
srand(777);
|
|
|
|
for (int i = 0; i < total_len; i++) {
|
|
|
|
data_to_write[i] = rand();
|
|
|
|
}
|
|
|
|
|
2020-08-22 22:40:07 -04:00
|
|
|
uint32_t erase_1 = measure_erase(part);
|
2020-05-11 14:32:40 -04:00
|
|
|
uint32_t speed_WR_4B = MEAS_WRITE(4);
|
|
|
|
uint32_t speed_RD_4B = MEAS_READ(4);
|
2020-08-22 22:40:07 -04:00
|
|
|
uint32_t erase_2 = measure_erase(part);
|
2020-05-11 14:32:40 -04:00
|
|
|
uint32_t speed_WR_2KB = MEAS_WRITE(2048);
|
|
|
|
uint32_t speed_RD_2KB = MEAS_READ(2048);
|
|
|
|
|
|
|
|
TEST_ASSERT_EQUAL_HEX8_ARRAY(data_to_write, data_read, total_len);
|
|
|
|
|
2022-01-16 14:19:14 -05:00
|
|
|
#define LOG_DATA(bus, suffix, chip) IDF_LOG_PERFORMANCE("FLASH_SPEED_BYTE_PER_SEC_"#bus#suffix, "%d, flash_chip: %s", speed_##suffix, chip)
|
|
|
|
#define LOG_ERASE(bus, var, chip) IDF_LOG_PERFORMANCE("FLASH_SPEED_BYTE_PER_SEC_"#bus"ERASE", "%d, flash_chip: %s", var, chip)
|
2020-05-11 14:32:40 -04:00
|
|
|
|
|
|
|
// Erase time may vary a lot, can increase threshold if this fails with a reasonable speed
|
2022-01-16 14:19:14 -05:00
|
|
|
#define LOG_PERFORMANCE(bus, chip) do {\
|
|
|
|
LOG_DATA(bus, WR_4B, chip); \
|
|
|
|
LOG_DATA(bus, RD_4B, chip); \
|
|
|
|
LOG_DATA(bus, WR_2KB, chip); \
|
|
|
|
LOG_DATA(bus, RD_2KB, chip); \
|
|
|
|
LOG_ERASE(bus, erase_1, chip); \
|
|
|
|
LOG_ERASE(bus, erase_2, chip); \
|
2020-05-11 14:32:40 -04:00
|
|
|
} while (0)
|
|
|
|
|
|
|
|
spi_host_device_t host_id;
|
|
|
|
int cs_id;
|
2021-03-25 05:36:17 -04:00
|
|
|
uint32_t id;
|
|
|
|
esp_flash_read_id(chip, &id);
|
|
|
|
const char *chip_name = get_chip_vendor(id >> 16);
|
2020-05-11 14:32:40 -04:00
|
|
|
|
|
|
|
get_chip_host(chip, &host_id, &cs_id);
|
2021-03-05 03:20:33 -05:00
|
|
|
if (host_id != SPI1_HOST) {
|
2020-05-11 14:32:40 -04:00
|
|
|
// Chips on other SPI buses
|
2022-01-16 14:19:14 -05:00
|
|
|
LOG_PERFORMANCE(EXT_, chip_name);
|
2020-05-11 14:32:40 -04:00
|
|
|
} else if (cs_id == 0) {
|
|
|
|
// Main flash
|
2022-01-16 14:19:14 -05:00
|
|
|
LOG_PERFORMANCE(,chip_name);
|
2020-05-11 14:32:40 -04:00
|
|
|
} else {
|
|
|
|
// Other cs pins on SPI1
|
2022-01-16 14:19:14 -05:00
|
|
|
LOG_PERFORMANCE(SPI1_, chip_name);
|
2020-05-11 14:32:40 -04:00
|
|
|
}
|
|
|
|
free(data_to_write);
|
|
|
|
free(data_read);
|
|
|
|
}
|
|
|
|
|
2022-05-20 06:16:47 -04:00
|
|
|
#if !BYPASS_MULTIPLE_CHIP
|
|
|
|
//To make performance data stable, needs to run on special runner
|
2020-12-17 23:25:32 -05:00
|
|
|
TEST_CASE("Test esp_flash read/write performance", "[esp_flash][test_env=UT_T1_ESP_FLASH]") {flash_test_func(test_flash_read_write_performance, 1);}
|
2022-05-20 06:16:47 -04:00
|
|
|
#endif
|
2021-06-09 04:38:22 -04:00
|
|
|
|
2022-05-20 06:16:47 -04:00
|
|
|
TEST_CASE_MULTI_FLASH("Test esp_flash read/write performance", test_flash_read_write_performance);
|
2023-01-10 00:59:46 -05:00
|
|
|
#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C6, ESP32H2)
|