tests: boards: esp32: Use smh in cache coex test

Simplifies test by using smh API.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
This commit is contained in:
Lucas Tamborrino 2024-08-14 08:03:56 -03:00 committed by Anas Nashif
parent adbf2192df
commit ad70ff7b9d
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -11,6 +11,7 @@
#include <zephyr/drivers/flash.h>
#include <zephyr/random/random.h>
#include <soc/soc_memory_layout.h>
#include <zephyr/multi_heap/shared_multi_heap.h>
/* 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");
}