diff --git a/components/esp_timer/test_apps/main/test_esp_timer.c b/components/esp_timer/test_apps/main/test_esp_timer.c index d88343229f..6d0a463658 100644 --- a/components/esp_timer/test_apps/main/test_esp_timer.c +++ b/components/esp_timer/test_apps/main/test_esp_timer.c @@ -386,9 +386,6 @@ TEST_CASE("esp_timer for very short intervals", "[esp_timer]") TEST_ESP_OK(esp_timer_delete(timer2)); } - -#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) -//IDF-5052 TEST_CASE("esp_timer_get_time call takes less than 1us", "[esp_timer]") { int64_t begin = esp_timer_get_time(); @@ -400,7 +397,6 @@ TEST_CASE("esp_timer_get_time call takes less than 1us", "[esp_timer]") int ns_per_call = (int) ((end - begin) * 1000 / iter_count); TEST_PERFORMANCE_LESS_THAN(ESP_TIMER_GET_TIME_PER_CALL, "%dns", ns_per_call); } -#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C2) static int64_t IRAM_ATTR __attribute__((noinline)) get_clock_diff(void) { diff --git a/components/idf_test/include/esp32c2/idf_performance_target.h b/components/idf_test/include/esp32c2/idf_performance_target.h index c010855edb..6414ef69f5 100644 --- a/components/idf_test/include/esp32c2/idf_performance_target.h +++ b/components/idf_test/include/esp32c2/idf_performance_target.h @@ -6,6 +6,14 @@ #pragma once +#include "sdkconfig.h" + +#ifdef CONFIG_XTAL_FREQ_26 +#define IDF_PERFORMANCE_MAX_ESP_TIMER_GET_TIME_PER_CALL 1900 +#else +#define IDF_PERFORMANCE_MAX_ESP_TIMER_GET_TIME_PER_CALL 1200 +#endif + // SHA256 hardware throughput at 160 MHz, threshold set lower than worst case #define IDF_PERFORMANCE_MIN_SHA256_THROUGHPUT_MBSEC 14 // esp_sha() time to process 32KB of input data from RAM diff --git a/examples/system/.build-test-rules.yml b/examples/system/.build-test-rules.yml index e7e1a87e03..be01c46d49 100644 --- a/examples/system/.build-test-rules.yml +++ b/examples/system/.build-test-rules.yml @@ -53,10 +53,6 @@ examples/system/esp_timer: - if: IDF_TARGET == "esp32c6" temporary: true reason: target esp32c6 is not supported yet - disable_test: - - if: IDF_TARGET == "esp32c2" - temporary: true - reason: lack of runners examples/system/flash_suspend: enable: diff --git a/examples/system/esp_timer/pytest_esp_timer.py b/examples/system/esp_timer/pytest_esp_timer.py index 4a7924282f..61ddf5d73c 100644 --- a/examples/system/esp_timer/pytest_esp_timer.py +++ b/examples/system/esp_timer/pytest_esp_timer.py @@ -28,11 +28,7 @@ LIGHT_SLEEP_TIME = 500000 ONE_SHOT_TIMER_PERIOD = 5000000 -# IDF-5052 -@pytest.mark.esp32 -@pytest.mark.esp32s2 -@pytest.mark.esp32s3 -@pytest.mark.esp32c3 +@pytest.mark.supported_targets @pytest.mark.generic @pytest.mark.parametrize( 'config', diff --git a/examples/system/esp_timer/sdkconfig.defaults b/examples/system/esp_timer/sdkconfig.defaults index 2d504b983f..3cf720d041 100644 --- a/examples/system/esp_timer/sdkconfig.defaults +++ b/examples/system/esp_timer/sdkconfig.defaults @@ -1 +1,5 @@ CONFIG_ESP_TIMER_PROFILING=y + +# NEWLIB_NANO_FORMAT is enabled by default on ESP32-C2 +# This example needs 64-bit integer formatting, this is why this option is disabled +CONFIG_NEWLIB_NANO_FORMAT=n