Commit ad70ff7b authored by Lucas Tamborrino's avatar Lucas Tamborrino Committed by Anas Nashif
Browse files

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



Simplifies test by using smh API.

Signed-off-by: default avatarLucas Tamborrino <lucas.tamborrino@espressif.com>
parent adbf2192
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
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
+2 −1
Original line number Diff line number Diff line
@@ -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");
	}