Merge branch 'fix/esp_timer_tests' into 'master'

esp_timer: Fix tests for C2 chip

Closes IDF-5052 and IDF-5011

See merge request espressif/esp-idf!21280
This commit is contained in:
Konstantin Kondrashov 2022-11-29 15:24:40 +08:00
commit 2f23825f60
5 changed files with 13 additions and 13 deletions

View File

@ -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)
{

View File

@ -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

View File

@ -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:

View File

@ -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',

View File

@ -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