From 217e439fa5590e2b4741e6e09f35771e04bcb36f Mon Sep 17 00:00:00 2001 From: Lucas Tamborrino Date: Fri, 9 Aug 2024 09:44:25 -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 577a3f115e1d213..7dd9dfcd5e85cb4 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 7f2370ed6e10996..06ab4a9326fc9e6 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"); }