mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
Merge branch 'bugfix/fix_psram_eid' into 'master'
bugfix(psram): fix psram size acquisition method, support esp32-pico chips See merge request idf/esp-idf!3750
This commit is contained in:
@@ -131,6 +131,8 @@ esp_spiram_size_t esp_spiram_get_chip_size()
|
||||
}
|
||||
psram_size_t psram_size = psram_get_size();
|
||||
switch (psram_size) {
|
||||
case PSRAM_SIZE_16MBITS:
|
||||
return ESP_SPIRAM_SIZE_16MBITS;
|
||||
case PSRAM_SIZE_32MBITS:
|
||||
return ESP_SPIRAM_SIZE_32MBITS;
|
||||
case PSRAM_SIZE_64MBITS:
|
||||
@@ -214,6 +216,7 @@ esp_err_t esp_spiram_reserve_dma_pool(size_t size) {
|
||||
size_t esp_spiram_get_size()
|
||||
{
|
||||
psram_size_t size=esp_spiram_get_chip_size();
|
||||
if (size==PSRAM_SIZE_16MBITS) return 2*1024*1024;
|
||||
if (size==PSRAM_SIZE_32MBITS) return 4*1024*1024;
|
||||
if (size==PSRAM_SIZE_64MBITS) return 8*1024*1024;
|
||||
return CONFIG_SPIRAM_SIZE;
|
||||
|
Reference in New Issue
Block a user