EasyManuals Logo

Espressif Systems ESP User Manual

Default Icon
191 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #129 background imageLoading...
Page #129 background image
Chapter 4. Software framework
When using ESP32 modules, how to check the size of their PSRAM?
For ESP32 modules, the esp_spiram_get_size() function in ESP-IDF can be used to obtain the size of
a modules PSRAM. This function returns the total size of the PSRAM in bytes and can be used for
memory allocation and management.
The following is an example for obtaining the size of PSRAM:
size_t psram_size = esp_spiram_get_size();
printf("PSRAM size: %d bytes\n", psram_size);
Note that the esp_spiram_get_size() function should be called before using the PSRAM to ensure the
correct PSRAM size can be obtained. Additionally, PSRAM functionality should be enabled in make
menuconfig, so that PSRAM can be used and con󰝘gured. Furthermore, the PSRAM size can also
be obtained in the bootloader log.
When ESP32 connected to a PSRAM externally, how to change its clock source?
In menucon󰝘g: menucon󰝘g -> Component con󰝘g -> ESP32-speci󰝘c -> SPI RAM con󰝘g.
When a 8 MB PSRAM mounted on ESP32, why only 4 MB of it is actually mapped?
Up to 4 MB (0x3F80_0000 ~ 0x3FBF_FFFF) of external RAM can be mapped into data address space, please
refer to the speci󰝘cations of Section 3.1.4 Memory Map in ESP32 Datasheet.
For a 8 MB PSRAM, you can access the other 4 MB following example himem.
Im using an ESP32 development board with the ocial PSRAM chip PSRAM64H embedded. But after
replacing another type of PSRAM chip to PSRAM64H, it failed to recognize when I ran an ESP-IDF example
and enabled the PSRAM conguration. What is the reason?
If you need to change the PSRAM chip, please update con󰝘guration options in menucon󰝘g -> Component
con󰝘g -> ESP32-speci󰝘c -> Support for external, SPI-connected RAM -> SPI RAM con󰝘g -> Type of SPI
RAM chip in use.
If you cannot 󰝘nd the corresponding type options of the new PSRAM chip you are about to use, please add
the chip driver manually.
It is recommended to use Espressifs o󰝚cial ESP-PSRAM chip for ESP32 series.
Why is the following error printed when I download the hello-world example into the ESP32-WROOM-32E
module?
E (225) psram: PSRAM ID read error: 0xffffffff
E (225) spiram: SPI RAM enabled but initialization failed. Bailing out.
The reason for the error is that the PSRAM (Component config > ESP32-specific > Sup-
port for external, SPI-connected RAM) setting is enabled in the software, but there is
no PSRAM support in the hardware.
Espressif Systems 112
Submit Document Feedback
Release master

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Espressif Systems ESP and is the answer not in the manual?

Espressif Systems ESP Specifications

General IconGeneral
BrandEspressif Systems
ModelESP
CategoryMotherboard
LanguageEnglish