mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 01:29:21 -04:00
fix(gptimer): re-enable test on P4
Remove timer_get_counter_time_sec in the ISR. Keep ISR as fast as possible and not allow FPU usage.
This commit is contained in:
parent
6c4534b6f4
commit
12d2eff381
@ -78,10 +78,6 @@ components/driver/test_apps/legacy_sigma_delta_driver:
|
||||
components/driver/test_apps/legacy_timer_driver:
|
||||
disable:
|
||||
- if: SOC_GPTIMER_SUPPORTED != 1
|
||||
disable_test:
|
||||
- if: IDF_TARGET == "esp32p4"
|
||||
temporary: true
|
||||
reason: test not pass, should be re-enable # TODO: IDF-8962
|
||||
depends_filepatterns:
|
||||
- components/driver/deprecated/**/*timer*
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2015-2022 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2015-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -62,7 +62,6 @@ static bool test_timer_group_isr_cb(void *arg)
|
||||
const timer_group_t timer_group = info->timer_group;
|
||||
const timer_idx_t timer_idx = info->timer_idx;
|
||||
uint64_t timer_val;
|
||||
double time;
|
||||
uint64_t alarm_value;
|
||||
timer_event_t evt;
|
||||
alarm_flag = true;
|
||||
@ -70,13 +69,11 @@ static bool test_timer_group_isr_cb(void *arg)
|
||||
timer_group_clr_intr_status_in_isr(timer_group, timer_idx);
|
||||
esp_rom_printf("This is TG%d timer[%d] reload-timer alarm!\n", timer_group, timer_idx);
|
||||
timer_get_counter_value(timer_group, timer_idx, &timer_val);
|
||||
timer_get_counter_time_sec(timer_group, timer_idx, &time);
|
||||
evt.type = TIMER_AUTORELOAD_EN;
|
||||
} else {
|
||||
timer_group_clr_intr_status_in_isr(timer_group, timer_idx);
|
||||
esp_rom_printf("This is TG%d timer[%d] count-up-timer alarm!\n", timer_group, timer_idx);
|
||||
timer_get_counter_value(timer_group, timer_idx, &timer_val);
|
||||
timer_get_counter_time_sec(timer_group, timer_idx, &time);
|
||||
timer_get_alarm_value(timer_group, timer_idx, &alarm_value);
|
||||
timer_set_counter_value(timer_group, timer_idx, 0);
|
||||
evt.type = TIMER_AUTORELOAD_DIS;
|
||||
@ -363,7 +360,7 @@ TEST_CASE("Timer_read_counter_value", "[hw_timer]")
|
||||
timer_config_t config = {
|
||||
.clk_src = TIMER_SRC_CLK_DEFAULT,
|
||||
.divider = clk_src_hz / TEST_TIMER_RESOLUTION_HZ,
|
||||
.alarm_en = TIMER_ALARM_EN,
|
||||
.alarm_en = TIMER_ALARM_DIS,
|
||||
.auto_reload = TIMER_AUTORELOAD_EN,
|
||||
.counter_dir = TIMER_COUNT_UP,
|
||||
.counter_en = TIMER_START,
|
||||
@ -469,7 +466,7 @@ TEST_CASE("Timer_counter_direction", "[hw_timer]")
|
||||
timer_config_t config = {
|
||||
.clk_src = TIMER_SRC_CLK_DEFAULT,
|
||||
.divider = clk_src_hz / TEST_TIMER_RESOLUTION_HZ,
|
||||
.alarm_en = TIMER_ALARM_EN,
|
||||
.alarm_en = TIMER_ALARM_DIS,
|
||||
.auto_reload = TIMER_AUTORELOAD_EN,
|
||||
.counter_dir = TIMER_COUNT_UP,
|
||||
.counter_en = TIMER_START,
|
||||
@ -508,7 +505,7 @@ TEST_CASE("Timer_divider", "[hw_timer]")
|
||||
timer_config_t config = {
|
||||
.clk_src = TIMER_SRC_CLK_DEFAULT,
|
||||
.divider = clk_src_hz / TEST_TIMER_RESOLUTION_HZ,
|
||||
.alarm_en = TIMER_ALARM_EN,
|
||||
.alarm_en = TIMER_ALARM_DIS,
|
||||
.auto_reload = TIMER_AUTORELOAD_EN,
|
||||
.counter_dir = TIMER_COUNT_UP,
|
||||
.counter_en = TIMER_START,
|
||||
|
@ -1,11 +1,9 @@
|
||||
# SPDX-FileCopyrightText: 2021-2022 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: CC0-1.0
|
||||
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
|
||||
|
||||
@pytest.mark.temp_skip_ci(targets=['esp32p4'], reason='esp32p4 support TBD') # TODO: IDF-8962
|
||||
@pytest.mark.supported_targets
|
||||
@pytest.mark.generic
|
||||
@pytest.mark.parametrize('config', [
|
||||
|
Loading…
x
Reference in New Issue
Block a user