diff --git a/components/esp_psram/device/esp_psram_impl_ap_hex.c b/components/esp_psram/device/esp_psram_impl_ap_hex.c index b544b325321..5f4e5566cfb 100644 --- a/components/esp_psram/device/esp_psram_impl_ap_hex.c +++ b/components/esp_psram/device/esp_psram_impl_ap_hex.c @@ -462,7 +462,7 @@ esp_err_t esp_psram_impl_enable(void) s_init_psram_mode_reg(PSRAM_CTRLR_LL_MSPI_ID_3, &mode_reg); if (s_check_psram_connected(PSRAM_CTRLR_LL_MSPI_ID_3) != ESP_OK) { - ESP_EARLY_LOGE(TAG, "PSRAM chip is not connected"); + PSRAM_LOG_NOTFOUND(TAG, "PSRAM chip is not connected"); return ESP_ERR_NOT_SUPPORTED; } diff --git a/components/esp_psram/device/esp_psram_impl_ap_quad.c b/components/esp_psram/device/esp_psram_impl_ap_quad.c index 8a84e470fb3..c12d2481d55 100644 --- a/components/esp_psram/device/esp_psram_impl_ap_quad.c +++ b/components/esp_psram/device/esp_psram_impl_ap_quad.c @@ -356,7 +356,7 @@ esp_err_t esp_psram_impl_enable(void) psram_disable_qio_mode(PSRAM_CTRLR_LL_MSPI_ID_1); if (s_check_psram_connected(PSRAM_CTRLR_LL_MSPI_ID_1) != ESP_OK) { - ESP_EARLY_LOGE(TAG, "PSRAM chip is not connected, or wrong PSRAM line mode"); + PSRAM_LOG_NOTFOUND(TAG, "PSRAM chip is not connected, or wrong PSRAM line mode"); return ESP_ERR_NOT_SUPPORTED; } diff --git a/components/esp_psram/device/include/esp_private/esp_psram_impl.h b/components/esp_psram/device/include/esp_private/esp_psram_impl.h index 92149a241b5..d2563174c04 100644 --- a/components/esp_psram/device/include/esp_private/esp_psram_impl.h +++ b/components/esp_psram/device/include/esp_private/esp_psram_impl.h @@ -36,6 +36,13 @@ extern "C" { #define PSRAM_HALFSLEEP_RESUME_CODE_ATTR #endif +// Downgrade "PSRAM not found" errors to warning if ignoring missing SPIRAM +#if CONFIG_SPIRAM_IGNORE_NOTFOUND +#define PSRAM_LOG_NOTFOUND ESP_EARLY_LOGW +#else +#define PSRAM_LOG_NOTFOUND ESP_EARLY_LOGE +#endif + /** * @brief To get the physical psram size in bytes. * diff --git a/components/esp_psram/esp32/esp_psram_impl_quad.c b/components/esp_psram/esp32/esp_psram_impl_quad.c index 8f002872034..ccb1f9a3d65 100644 --- a/components/esp_psram/esp32/esp_psram_impl_quad.c +++ b/components/esp_psram/esp32/esp_psram_impl_quad.c @@ -988,7 +988,7 @@ esp_err_t IRAM_ATTR esp_psram_impl_enable(void) //psram init */ psram_read_id(spi_num, &s_psram_id); if (!PSRAM_IS_VALID(s_psram_id)) { - ESP_EARLY_LOGE(TAG, "PSRAM ID read error: 0x%08" PRIx32 ", PSRAM chip not found or not supported", (uint32_t)s_psram_id); + PSRAM_LOG_NOTFOUND(TAG, "PSRAM ID read error: 0x%08" PRIx32 ", PSRAM chip not found or not supported", (uint32_t)s_psram_id); return ESP_ERR_NOT_SUPPORTED; } } diff --git a/components/esp_psram/esp32s3/esp_psram_impl_octal.c b/components/esp_psram/esp32s3/esp_psram_impl_octal.c index a6b42fbd875..b80bdb8b802 100644 --- a/components/esp_psram/esp32s3/esp_psram_impl_octal.c +++ b/components/esp_psram/esp32s3/esp_psram_impl_octal.c @@ -359,7 +359,7 @@ esp_err_t esp_psram_impl_enable(void) s_init_psram_mode_reg(1, &mode_reg); if (s_check_psram_connected(1) != ESP_OK) { - ESP_EARLY_LOGE(TAG, "PSRAM chip is not connected, or wrong PSRAM line mode"); + PSRAM_LOG_NOTFOUND(TAG, "PSRAM chip is not connected, or wrong PSRAM line mode"); return ESP_ERR_NOT_SUPPORTED; } diff --git a/components/esp_psram/system_layer/esp_psram.c b/components/esp_psram/system_layer/esp_psram.c index 7c34e6aea44..f7a09c42814 100644 --- a/components/esp_psram/system_layer/esp_psram.c +++ b/components/esp_psram/system_layer/esp_psram.c @@ -219,7 +219,7 @@ static esp_err_t s_psram_chip_init(void) ret = esp_psram_impl_enable(); if (ret != ESP_OK) { #if CONFIG_SPIRAM_IGNORE_NOTFOUND - ESP_EARLY_LOGE(TAG, "PSRAM enabled but initialization failed. Bailing out."); + ESP_EARLY_LOGW(TAG, "PSRAM enabled but initialization failed. Bailing out."); #endif return ret; } diff --git a/components/esp_system/port/cpu_start.c b/components/esp_system/port/cpu_start.c index f4fd9e92cfe..6078ede895e 100644 --- a/components/esp_system/port/cpu_start.c +++ b/components/esp_system/port/cpu_start.c @@ -657,7 +657,7 @@ MSPI_INIT_ATTR void mspi_init(void) #if CONFIG_SPIRAM_BOOT_HW_INIT if (esp_psram_chip_init() != ESP_OK) { #if CONFIG_SPIRAM_IGNORE_NOTFOUND - ESP_DRAM_LOGE(TAG, "Failed to init external RAM; continuing without it."); + ESP_DRAM_LOGW(TAG, "Failed to init external RAM; continuing without it."); #else ESP_DRAM_LOGE(TAG, "Failed to init external RAM!"); abort();