/* * SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD * * SPDX-License-Identifier: Apache-2.0 */ /* This code tests the interaction between PSRAM and SPI flash routines. */ #include #include #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/semphr.h" #include "freertos/queue.h" #include "unity.h" #include #include #include #include #include "esp_heap_caps.h" #include "esp_spi_flash.h" #include "esp_partition.h" #include "test_utils.h" #include "soc/soc.h" #if CONFIG_SPIRAM #if CONFIG_SPIRAM_USE_CAPS_ALLOC || CONFIG_SPIRAM_USE_MALLOC #define USE_CAPS_ALLOC 1 #endif // CONFIG_SPIRAM_USE_CAPS_ALLOC || CONFIG_SPIRAM_USE_MALLOC #define TSTSZ (16*1024) #if !CONFIG_FREERTOS_UNICORE volatile static int res[2], err[2]; void tstMem(void *arg) { volatile unsigned char *mem=(volatile unsigned char*)arg; int p=0; while(1) { for (int i=0; i