mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-03 20:17:34 +00:00
refactor(spi_flash): optimize flash functions to save iram memory
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
import pytest
|
||||
from pytest_embedded import Dut
|
||||
|
@@ -206,7 +206,10 @@ TEST_CASE("flash suspend test", "[spi_flash][suspend]")
|
||||
ESP_LOGI(TAG, "During Erase, ISR interval time:\n\t\t%0.2f us", GET_US_BY_CCOUNT(s_isr_interval_time / (times - 1)));
|
||||
ESP_LOGI(TAG, "The tsus value which passes the test is:\n\t\t%ld us", isr_interval_time - isr_duration_time);
|
||||
// 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);
|
||||
#endif
|
||||
ESP_LOGI(TAG, "Reasonable value!");
|
||||
|
||||
ESP_LOGI(TAG, "Finish");
|
||||
|
@@ -11,6 +11,7 @@ from pytest_embedded import Dut
|
||||
[
|
||||
'release',
|
||||
'i2c_isr_flash',
|
||||
'text_in_flash_when_suspend',
|
||||
],
|
||||
indirect=True,
|
||||
)
|
||||
|
@@ -0,0 +1,2 @@
|
||||
CONFIG_SPI_FLASH_AUTO_SUSPEND=y
|
||||
CONFIG_SPI_FLASH_PLACE_FUNCTIONS_IN_IRAM=n
|
Reference in New Issue
Block a user