From e495d41de8881a3278eb009167b6827d5051b819 Mon Sep 17 00:00:00 2001 From: Armando Date: Mon, 15 May 2023 15:36:43 +0800 Subject: [PATCH] psram: supported 32MB psram on ESP32S3 --- components/esp_psram/esp32s3/esp_psram_impl_octal.c | 3 ++- components/esp_psram/esp_psram_impl.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/components/esp_psram/esp32s3/esp_psram_impl_octal.c b/components/esp_psram/esp32s3/esp_psram_impl_octal.c index d8d54a3a18..634b8b80d8 100644 --- a/components/esp_psram/esp32s3/esp_psram_impl_octal.c +++ b/components/esp_psram/esp32s3/esp_psram_impl_octal.c @@ -325,7 +325,8 @@ esp_err_t esp_psram_impl_enable(psram_vaddr_mode_t vaddrmode) s_psram_size = mode_reg.mr2.density == 0x1 ? PSRAM_SIZE_4MB : mode_reg.mr2.density == 0X3 ? PSRAM_SIZE_8MB : mode_reg.mr2.density == 0x5 ? PSRAM_SIZE_16MB : - mode_reg.mr2.density == 0x7 ? PSRAM_SIZE_32MB : 0; + mode_reg.mr2.density == 0x7 ? PSRAM_SIZE_32MB : + mode_reg.mr2.density == 0x6 ? PSRAM_SIZE_64MB : 0; //Do PSRAM timing tuning, we use SPI1 to do the tuning, and set the SPI0 PSRAM timing related registers accordingly mspi_timing_psram_tuning(); diff --git a/components/esp_psram/esp_psram_impl.h b/components/esp_psram/esp_psram_impl.h index 12fd28e299..db382d2850 100644 --- a/components/esp_psram/esp_psram_impl.h +++ b/components/esp_psram/esp_psram_impl.h @@ -18,6 +18,7 @@ extern "C" { #define PSRAM_SIZE_8MB (8 * 1024 * 1024) #define PSRAM_SIZE_16MB (16 * 1024 * 1024) #define PSRAM_SIZE_32MB (32 * 1024 * 1024) +#define PSRAM_SIZE_64MB (64 * 1024 * 1024) /*