From ad70ff7b9d5dbd342f53e4abd7f5cb13bf8c111d Mon Sep 17 00:00:00 2001 From: Lucas Tamborrino Date: Wed, 14 Aug 2024 08:03:56 -0300 Subject: [PATCH] tests: boards: esp32: Use smh in cache coex test Simplifies test by using smh API. Signed-off-by: Lucas Tamborrino --- tests/boards/espressif_esp32/cache_coex/prj.conf | 1 - tests/boards/espressif_esp32/cache_coex/src/cache_coex.c | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/boards/espressif_esp32/cache_coex/prj.conf b/tests/boards/espressif_esp32/cache_coex/prj.conf index 577a3f115e1d21..7dd9dfcd5e85cb 100644 --- a/tests/boards/espressif_esp32/cache_coex/prj.conf +++ b/tests/boards/espressif_esp32/cache_coex/prj.conf @@ -1,5 +1,4 @@ CONFIG_ESP_SPIRAM=y -CONFIG_ESP_HEAP_MIN_EXTRAM_THRESHOLD=2048 CONFIG_HEAP_MEM_POOL_SIZE=98304 CONFIG_ESP_HEAP_SEARCH_ALL_REGIONS=n CONFIG_FLASH=y diff --git a/tests/boards/espressif_esp32/cache_coex/src/cache_coex.c b/tests/boards/espressif_esp32/cache_coex/src/cache_coex.c index 7f2370ed6e1099..06ab4a9326fc9e 100644 --- a/tests/boards/espressif_esp32/cache_coex/src/cache_coex.c +++ b/tests/boards/espressif_esp32/cache_coex/src/cache_coex.c @@ -11,6 +11,7 @@ #include #include #include +#include /* definitions used in Flash & RAM operations */ #define SPIRAM_ALLOC_SIZE (24 * 1024) @@ -201,7 +202,7 @@ static void psram_test(void) static void psram_init(void) { - mem = k_malloc(SPIRAM_ALLOC_SIZE); + mem = shared_multi_heap_aligned_alloc(SMH_REG_ATTR_EXTERNAL, 32, SPIRAM_ALLOC_SIZE); if (!mem) { TC_ERROR("SPIRAM allocation has failed\n"); }