/* 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 "freertos/xtensa_api.h" #include "unity.h" #include "soc/dport_reg.h" #include "soc/io_mux_reg.h" #include #include #include #include #include "esp_heap_caps.h" #include "esp_spi_flash.h" #include "esp_partition.h" #include "test_utils.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