fix(spi_flash): Fix suspend issue on esp32s31, and add trs timing on other target

This commit is contained in:
C.S.M
2026-06-08 11:15:13 +08:00
parent cd9de8284d
commit 2acd9b9a7c
26 changed files with 249 additions and 46 deletions
@@ -213,7 +213,7 @@ TEST_CASE("flash suspend test", "[spi_flash][suspend]")
// 15 stands for threshold. We allow the interval time minus duration time is little bit larger than TSUS value
#if CONFIG_SPI_FLASH_PLACE_FUNCTIONS_IN_IRAM
// Don't check the performance because it should be slow.
TEST_ASSERT_LESS_THAN(CONFIG_SPI_FLASH_SUSPEND_TSUS_VAL_US + 15, isr_interval_time - isr_duration_time);
TEST_ASSERT_LESS_THAN(CONFIG_SPI_FLASH_SUSPEND_TSUS_VAL_US + 35, isr_interval_time - isr_duration_time);
#endif
ESP_LOGI(TAG, "Reasonable value!");
@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Apache-2.0
import pytest
from pytest_embedded import Dut
@@ -17,3 +17,18 @@ from pytest_embedded_idf.utils import idf_parametrize
@idf_parametrize('target', ['esp32c3'], indirect=['target'])
def test_flash_auto_suspend(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=30)
# Generic test for all targets that support flash auto suspend
@pytest.mark.generic
@pytest.mark.parametrize(
'config',
[
'release',
'text_in_flash_when_suspend',
],
indirect=True,
)
@idf_parametrize('target', ['esp32c5', 'esp32c61', 'esp32s31'], indirect=['target'])
def test_flash_auto_suspend_generic(dut: Dut) -> None:
dut.run_all_single_board_cases(timeout=30)