mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
fix(sdmmc): Add a better handling of devices accessing PSRAM through DMA
Closes https://github.com/espressif/esp-idf/issues/18412
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2025-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -9,23 +9,16 @@
|
||||
#include <inttypes.h>
|
||||
#include "unity.h"
|
||||
#include "unity_fixture.h"
|
||||
#include "unity_test_utils.h"
|
||||
#include "sd_protocol_defs.h"
|
||||
#include "sdmmc_cmd.h"
|
||||
#include "sdmmc_test_begin_end_sd.h"
|
||||
#include "sdmmc_test_rw_common.h"
|
||||
#include "esp_blockdev.h"
|
||||
|
||||
TEST_GROUP(sdmmc);
|
||||
#define TEST_MEMORY_LEAK_THRESHOLD (200)
|
||||
|
||||
TEST_SETUP(sdmmc)
|
||||
{
|
||||
}
|
||||
|
||||
TEST_TEAR_DOWN(sdmmc)
|
||||
{
|
||||
}
|
||||
|
||||
TEST(sdmmc, test_bdl_interface)
|
||||
TEST_CASE("sdmmc extra, bdl interface test", "[sdcard]")
|
||||
{
|
||||
sdmmc_card_t card;
|
||||
int slot = 1;
|
||||
@@ -70,7 +63,7 @@ TEST(sdmmc, test_bdl_interface)
|
||||
sdmmc_test_sd_end(&card);
|
||||
}
|
||||
|
||||
TEST(sdmmc, test_multiblock_unaligned_rw)
|
||||
TEST_CASE("sdmmc extra, multiblock unaligned rw test", "[sdcard]")
|
||||
{
|
||||
sdmmc_card_t card;
|
||||
int slot = 1;
|
||||
@@ -82,13 +75,17 @@ TEST(sdmmc, test_multiblock_unaligned_rw)
|
||||
sdmmc_test_sd_end(&card);
|
||||
}
|
||||
|
||||
TEST_GROUP_RUNNER(sdmmc)
|
||||
void setUp(void)
|
||||
{
|
||||
RUN_TEST_CASE(sdmmc, test_bdl_interface)
|
||||
RUN_TEST_CASE(sdmmc, test_multiblock_unaligned_rw)
|
||||
unity_utils_record_free_mem();
|
||||
}
|
||||
|
||||
void tearDown(void)
|
||||
{
|
||||
unity_utils_evaluate_leaks_direct(TEST_MEMORY_LEAK_THRESHOLD);
|
||||
}
|
||||
|
||||
void app_main(void)
|
||||
{
|
||||
UNITY_MAIN(sdmmc);
|
||||
unity_run_menu();
|
||||
}
|
||||
|
||||
@@ -10,4 +10,4 @@ from pytest_embedded_idf.utils import idf_parametrize
|
||||
@idf_parametrize('config', ['default'], indirect=['config'])
|
||||
@idf_parametrize('target', ['esp32'], indirect=['target'])
|
||||
def test_sdmmc_extra(dut: Dut) -> None:
|
||||
dut.expect_unity_test_output()
|
||||
dut.run_all_single_board_cases()
|
||||
|
||||
Reference in New Issue
Block a user