Skip to content

Commit 0d118ec

Browse files
sylvioalvesmmahadevan108
authored andcommitted
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 <[email protected]>
1 parent 1596ee0 commit 0d118ec

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

soc/espressif/common/Kconfig.spiram

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ config ESP_SPIRAM_HEAP_SIZE
3030
help
3131
Specify size of SPIRAM heap.
3232

33+
config ESP_SPIRAM_MEMTEST
34+
bool "Run memory test on SPI RAM initialization"
35+
default y
36+
help
37+
Runs a memory test on initialization. Disable this for faster startup.
38+
3339
choice SPIRAM_MODE
3440
prompt "Mode (QUAD/OCT) of SPI RAM chip in use"
3541
default SPIRAM_MODE_QUAD

soc/espressif/common/psram.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,12 @@ void esp_init_psram(void)
4040
ets_printf("External RAM size is less than configured.\n");
4141
}
4242

43-
if (esp_psram_is_initialized()) {
44-
if (!esp_psram_extram_test()) {
45-
ets_printf("External RAM failed memory test!");
46-
return;
43+
if (IS_ENABLED(CONFIG_ESP_SPIRAM_MEMTEST)) {
44+
if (esp_psram_is_initialized()) {
45+
if (!esp_psram_extram_test()) {
46+
ets_printf("External RAM failed memory test!");
47+
return;
48+
}
4749
}
4850
}
4951

0 commit comments

Comments
 (0)