mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
feat(esp_timer): Re-enable tests on ESP32P4
esp_timer example test requires Light Sleep support.
This commit is contained in:
parent
d92cd1b7ec
commit
2b909f99d5
@ -1,7 +0,0 @@
|
|||||||
# Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps
|
|
||||||
|
|
||||||
components/esp_timer/test_apps:
|
|
||||||
disable:
|
|
||||||
- if: IDF_TARGET in ["esp32h2", "esp32p4"] # Sleep support IDF-6267, IDF-7528
|
|
||||||
temporary: true
|
|
||||||
reason: Not supported yet
|
|
@ -1,3 +1,3 @@
|
|||||||
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-S2 | ESP32-S3 |
|
| Supported Targets | ESP32 | ESP32-C2 | ESP32-C3 | ESP32-C6 | ESP32-H2 | ESP32-P4 | ESP32-S2 | ESP32-S3 |
|
||||||
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- |
|
| ----------------- | ----- | -------- | -------- | -------- | -------- | -------- | -------- | -------- |
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@
|
|||||||
#include "esp_rom_sys.h"
|
#include "esp_rom_sys.h"
|
||||||
#include "esp_sleep.h"
|
#include "esp_sleep.h"
|
||||||
|
|
||||||
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32P4) // TODO IDF-7528
|
#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32P4) // TODO Light Sleep support - IDF-7528
|
||||||
|
|
||||||
static void timer_cb1(void *arg)
|
static void timer_cb1(void *arg)
|
||||||
{
|
{
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||||
# SPDX-License-Identifier: Unlicense OR CC0-1.0
|
# SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
from pytest_embedded import Dut
|
from pytest_embedded import Dut
|
||||||
|
|
||||||
# TODO: IDF-8979
|
|
||||||
CONFIGS = [
|
CONFIGS = [
|
||||||
pytest.param('general', marks=[pytest.mark.supported_targets, pytest.mark.temp_skip_ci(targets=['esp32h2', 'esp32p4'], reason='h2/p4 support TBD')]),
|
pytest.param('general', marks=[pytest.mark.supported_targets]),
|
||||||
pytest.param('release', marks=[pytest.mark.supported_targets, pytest.mark.temp_skip_ci(targets=['esp32h2', 'esp32p4'], reason='h2/p4 support TBD')]),
|
pytest.param('release', marks=[pytest.mark.supported_targets]),
|
||||||
pytest.param('single_core', marks=[pytest.mark.esp32]),
|
pytest.param('single_core', marks=[pytest.mark.esp32]),
|
||||||
pytest.param('freertos_compliance', marks=[pytest.mark.esp32]),
|
pytest.param('freertos_compliance', marks=[pytest.mark.esp32]),
|
||||||
pytest.param('isr_dispatch_esp32', marks=[pytest.mark.esp32]),
|
pytest.param('isr_dispatch_esp32', marks=[pytest.mark.esp32]),
|
||||||
|
@ -6,6 +6,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#define IDF_PERFORMANCE_MAX_ESP_TIMER_GET_TIME_PER_CALL 1900
|
||||||
|
|
||||||
#define IDF_PERFORMANCE_MIN_AES_CBC_THROUGHPUT_MBSEC 43
|
#define IDF_PERFORMANCE_MIN_AES_CBC_THROUGHPUT_MBSEC 43
|
||||||
|
|
||||||
// SHA256 hardware throughput at 160 MHz, threshold set lower than worst case
|
// SHA256 hardware throughput at 160 MHz, threshold set lower than worst case
|
||||||
|
@ -71,11 +71,7 @@ examples/system/esp_timer:
|
|||||||
disable:
|
disable:
|
||||||
- if: IDF_TARGET in ["esp32p4"]
|
- if: IDF_TARGET in ["esp32p4"]
|
||||||
temporary: true
|
temporary: true
|
||||||
reason: target(s) is not supported yet # TODO: IDF-7529
|
reason: Light Sleep support TBD # TODO: IDF-7528
|
||||||
disable_test:
|
|
||||||
- if: IDF_TARGET in ["esp32c6", "esp32h2"]
|
|
||||||
temporary: true
|
|
||||||
reason: lack of runner
|
|
||||||
depends_components:
|
depends_components:
|
||||||
- esp_timer
|
- esp_timer
|
||||||
|
|
||||||
|
@ -70,7 +70,7 @@ void app_main(void)
|
|||||||
int64_t t2 = esp_timer_get_time();
|
int64_t t2 = esp_timer_get_time();
|
||||||
ESP_LOGI(TAG, "Woke up from light sleep, time since boot: %lld us", t2);
|
ESP_LOGI(TAG, "Woke up from light sleep, time since boot: %lld us", t2);
|
||||||
|
|
||||||
assert(llabs((t2 - t1) - 500000) < 1000);
|
assert(llabs((t2 - t1) - 500000) < 1200);
|
||||||
|
|
||||||
/* Let the timer run for a little bit more */
|
/* Let the timer run for a little bit more */
|
||||||
usleep(2000000);
|
usleep(2000000);
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: CC0-1.0
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
@ -29,7 +28,7 @@ ONE_SHOT_TIMER_PERIOD = 5000000
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.supported_targets
|
@pytest.mark.supported_targets
|
||||||
@pytest.mark.temp_skip_ci(targets=['esp32c6', 'esp32h2', 'esp32p4'], reason='c6/h2/p4 support TBD') # TODO: IDF-8979
|
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='Light Sleep support TBD') # TODO: IDF-7528
|
||||||
@pytest.mark.generic
|
@pytest.mark.generic
|
||||||
@pytest.mark.parametrize(
|
@pytest.mark.parametrize(
|
||||||
'config',
|
'config',
|
||||||
@ -60,7 +59,7 @@ def test_esp_timer(dut: Dut) -> None:
|
|||||||
one_shot_timer_time = int(match.group(1))
|
one_shot_timer_time = int(match.group(1))
|
||||||
diff = start_time + ONE_SHOT_TIMER_PERIOD - one_shot_timer_time
|
diff = start_time + ONE_SHOT_TIMER_PERIOD - one_shot_timer_time
|
||||||
logging.info('One-shot timer, time: {} us, diff: {}'.format(one_shot_timer_time, diff))
|
logging.info('One-shot timer, time: {} us, diff: {}'.format(one_shot_timer_time, diff))
|
||||||
assert abs(diff) < 350
|
assert abs(diff) < 400
|
||||||
|
|
||||||
match = dut.expect(RESTART_REGEX, timeout=3)
|
match = dut.expect(RESTART_REGEX, timeout=3)
|
||||||
start_time = int(match.group(1))
|
start_time = int(match.group(1))
|
||||||
@ -82,7 +81,7 @@ def test_esp_timer(dut: Dut) -> None:
|
|||||||
logging.info('Enter sleep: {}, exit sleep: {}, slept: {}'.format(
|
logging.info('Enter sleep: {}, exit sleep: {}, slept: {}'.format(
|
||||||
sleep_enter_time, sleep_exit_time, sleep_time))
|
sleep_enter_time, sleep_exit_time, sleep_time))
|
||||||
|
|
||||||
assert abs(sleep_time - LIGHT_SLEEP_TIME) < 1000
|
assert abs(sleep_time - LIGHT_SLEEP_TIME) < 1200
|
||||||
|
|
||||||
for i in range(5, 7):
|
for i in range(5, 7):
|
||||||
match = dut.expect(PERIODIC_TIMER_REGEX, timeout=2)
|
match = dut.expect(PERIODIC_TIMER_REGEX, timeout=2)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user