Skip to content

Commit 436dbe3

Browse files
tmedicciAlan C. Assis
authored andcommitted
Documentation/esp32s3: Add ESP32-S3's PSRAM entry
Add entry for the external PSRAM support on ESP32-S3 and document how to move data to the external PSRAM to free the internal memory.
1 parent 97aa905 commit 436dbe3

File tree

1 file changed

+24
-0
lines changed
  • Documentation/platforms/xtensa/esp32s3

1 file changed

+24
-0
lines changed

Documentation/platforms/xtensa/esp32s3/index.rst

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -430,6 +430,30 @@ using WPA2.
430430

431431
The ``dhcpd_start`` is necessary to let your board to associate an IP to your smartphone.
432432

433+
PSRAM
434+
-----
435+
436+
The external PSRAM is supported in ESP32-S3. The PSRAM is mapped to the data bus during
437+
the boot process. The PSRAM is used as a heap memory and is available for the application.
438+
439+
Please check the following examples for more information:
440+
441+
* :ref:`esp32s3-devkit:psram_octal <platforms/xtensa/esp32s3/boards/esp32s3-devkit/index:psram_octal>`
442+
* :ref:`esp32s3-devkit:psram_quad <platforms/xtensa/esp32s3/boards/esp32s3-devkit/index:psram_quad>`
443+
444+
Moving not initialized data to the external PSRAM
445+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
446+
447+
Static or global not-initialized data can be moved to the external PSRAM. Usually allocated at the
448+
``.bss`` memory segment, this data can be set to another section in the external PSRAM.
449+
Set the attribute ``__attribute__ ((section (".ext_ram.bss")))`` to the variable. For example::
450+
451+
__attribute__ ((section (".ext_ram.bss"))) static uint8_t my_data[1024];
452+
453+
``my_data`` will be allocated in the external PSRAM and can be explicitly initialized on runtime.
454+
455+
This is particularly useful when the internal RAM is not enough to hold all the data.
456+
433457
Supported Boards
434458
================
435459

0 commit comments

Comments
 (0)