Also add cache mode choice to menuconfig

This commit is contained in:
Jeroen Domburg 2017-03-27 16:04:34 +08:00
parent 4fd173c8c3
commit c46d7e60b0
2 changed files with 22 additions and 0 deletions

View file

@ -179,6 +179,24 @@ config SPIRAM_CACHE_WORKAROUND_TEST
This setting helps testing the SPIRAM cache workaround. It generates a lot of interrupts so
the bug, if still existing, triggers quicker.
choice MEMMAP_SPIRAM_CACHE_TYPE
depends on !FREERTOS_UNICORE
prompt "Type of dual-core PSRAM caching strategy"
default MEMMAP_SPIRAM_CACHE_EVENODD
help
The PSRAM cache can work in two ways for dual-core operation: the cache of one CPU
can handle the even cache lines while the other one can handle the odd cache lines
(even/odd) or the cache of the PRO CPU handles the low 2MiB while the APP CPU cache
handles the high 2MiB.
config MEMMAP_SPIRAM_CACHE_EVENODD
bool "Even/Odd"
config MEMMAP_SPIRAM_CACHE_LOWHIGH
bool "Low/High"
endchoice
choice MEMMAP_SPIRAM_TYPE
prompt "Type of SPI RAM chip in use"
default MEMMAP_SPIRAM_TYPE_ESPPSRAM32

View file

@ -99,7 +99,11 @@ static const char* TAG = "cpu_start";
#if CONFIG_FREERTOS_UNICORE
#define PSRAM_MODE PSRAM_VADDR_MODE_NORMAL
#else
#if CONFIG_MEMMAP_SPIRAM_CACHE_EVENODD
#define PSRAM_MODE PSRAM_VADDR_MODE_EVENODD
#else
#define PSRAM_MODE PSRAM_VADDR_MODE_LOWHIGH
#endif
#endif
/*