Skip to content

Commit

Permalink
tests: boards: esp32: Use smh in cache coex test
Browse files Browse the repository at this point in the history
Simplifies test by using smh API.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
  • Loading branch information
LucasTambor committed Aug 12, 2024
1 parent 5d073d0 commit 4ae140b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 0 additions & 1 deletion tests/boards/espressif_esp32/cache_coex/prj.conf
Original file line number Diff line number Diff line change
@@ -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
Expand Down
3 changes: 2 additions & 1 deletion tests/boards/espressif_esp32/cache_coex/src/cache_coex.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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");
}
Expand Down

0 comments on commit 4ae140b

Please sign in to comment.