From b057a76d28a98df5558cc6208d38d725a1ebad49 Mon Sep 17 00:00:00 2001 From: Marius Vikhammer Date: Fri, 3 Apr 2026 16:11:41 +0800 Subject: [PATCH] test(esp_timer): enable ESP32-S31 target tests --- components/esp_timer/test_apps/.build-test-rules.yml | 2 ++ .../esp_timer/test_apps/include/esp_timer_performance.h | 4 ++++ components/esp_timer/test_apps/main/test_esp_timer_dfs.c | 2 ++ 3 files changed, 8 insertions(+) diff --git a/components/esp_timer/test_apps/.build-test-rules.yml b/components/esp_timer/test_apps/.build-test-rules.yml index b749c56900..131939a225 100644 --- a/components/esp_timer/test_apps/.build-test-rules.yml +++ b/components/esp_timer/test_apps/.build-test-rules.yml @@ -7,3 +7,5 @@ components/esp_timer/test_apps: disable: - if: CONFIG_NAME == "dfs" and SOC_CLK_XTAL32K_SUPPORTED != 1 reason: The test requires the XTAL32K clock to measure the esp_timer timing accuracy + - if: CONFIG_NAME == "dfs" and SOC_PM_SUPPORTED != 1 + reason: The test requires the PM functionality diff --git a/components/esp_timer/test_apps/include/esp_timer_performance.h b/components/esp_timer/test_apps/include/esp_timer_performance.h index f3cef704ea..59bb9b4b0b 100644 --- a/components/esp_timer/test_apps/include/esp_timer_performance.h +++ b/components/esp_timer/test_apps/include/esp_timer_performance.h @@ -39,4 +39,8 @@ #undef IDF_PERFORMANCE_MAX_ESP_TIMER_GET_TIME_PER_CALL #define IDF_PERFORMANCE_MAX_ESP_TIMER_GET_TIME_PER_CALL 1900 +#elif CONFIG_IDF_TARGET_ESP32S31 +#undef IDF_PERFORMANCE_MAX_ESP_TIMER_GET_TIME_PER_CALL +#define IDF_PERFORMANCE_MAX_ESP_TIMER_GET_TIME_PER_CALL 1200 + #endif diff --git a/components/esp_timer/test_apps/main/test_esp_timer_dfs.c b/components/esp_timer/test_apps/main/test_esp_timer_dfs.c index 5bc5669334..32c38532a9 100644 --- a/components/esp_timer/test_apps/main/test_esp_timer_dfs.c +++ b/components/esp_timer/test_apps/main/test_esp_timer_dfs.c @@ -43,6 +43,8 @@ static uint32_t supported_freq[] = {8, 16, 32, 48, 64, 96}; static uint32_t supported_freq[] = {8, 16, 24, 32}; #elif CONFIG_IDF_TARGET_ESP32P4 static uint32_t supported_freq[] = {10, 20, 40, 90, 180, 360}; +#elif CONFIG_IDF_TARGET_ESP32S31 +static uint32_t supported_freq[] = {10, 20, 40, 90, 180, 320}; #endif static SemaphoreHandle_t s_alarm_finished;