soc: esp32: add SPIRAM memory test kconfig option
Add kconfig to disable SPIRAM memory test. Allows faster SoC initialization when disabled. Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This commit is contained in:
parent
1596ee0415
commit
0d118ec1ab
2 changed files with 12 additions and 4 deletions
|
@ -30,6 +30,12 @@ config ESP_SPIRAM_HEAP_SIZE
|
|||
help
|
||||
Specify size of SPIRAM heap.
|
||||
|
||||
config ESP_SPIRAM_MEMTEST
|
||||
bool "Run memory test on SPI RAM initialization"
|
||||
default y
|
||||
help
|
||||
Runs a memory test on initialization. Disable this for faster startup.
|
||||
|
||||
choice SPIRAM_MODE
|
||||
prompt "Mode (QUAD/OCT) of SPI RAM chip in use"
|
||||
default SPIRAM_MODE_QUAD
|
||||
|
|
|
@ -40,12 +40,14 @@ void esp_init_psram(void)
|
|||
ets_printf("External RAM size is less than configured.\n");
|
||||
}
|
||||
|
||||
if (IS_ENABLED(CONFIG_ESP_SPIRAM_MEMTEST)) {
|
||||
if (esp_psram_is_initialized()) {
|
||||
if (!esp_psram_extram_test()) {
|
||||
ets_printf("External RAM failed memory test!");
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
memset(&_ext_ram_bss_start, 0,
|
||||
(&_ext_ram_bss_end - &_ext_ram_bss_start) * sizeof(_ext_ram_bss_start));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue