88---
99
1010This component enables and configures PSRAM if/when available on ESP32 modules/boards.
11- It is automatically loaded and enabled by components that require it.
11+ Some components require PSRAM, while others may use it for optional features. In any case
12+ it is required to explicitly configured - this is a change from previous versions of ESPHome.
1213
13- PSRAM is only available on the ESP32.
14+ PSRAM is not available with platforms other than ESP32.
1415
1516``` yaml
1617# Example configuration entry
2122
2223## Configuration variables
2324
24- - **mode** (*Optional*): Defines the operating mode the PSRAM should utilize. One of ` quad` (default) or `octal`.
25+ - **mode** (*Optional*): Defines the operating mode the PSRAM should utilize. One of ` quad`, `octal` or `hex`.
26+ Defaults to `quad` for ESP32 and `hex` for ESP32-P4. ESP32-S3 has no default and *requires* this option to be set.
27+ See notes below.
2528- **speed** (*Optional*, int): The speed at which the PSRAM should operate. One of `40MHz` (default), `80MHz` or `120MHz`.
2629- **enable_ecc** (*Optional*, bool): For octal mode, enable ECC (Error Correction Code) for the PSRAM (default is off.)
2730 ECC is a method of detecting and correcting single-bit errors in memory. It will reduce the available PSRAM size and speed by
@@ -30,15 +33,22 @@ psram:
3033- **disabled** (*Optional*, bool): Don't try to initialize the PSRAM. This is needed if one of the configured components autoloads psram
3134 but the ESP32 module doesn't have PSRAM and you need to use one of the PSRAM control lines for something else. e.g. ethernet. Defaults to ``false``.
3235
33- # # Restrictions
36+ # # Modes
37+
38+ The ESP32 PSRAM is only available in `quad` mode, and ESP32-P4 only supports `hex` mode. These are the defaults
39+ when using those variants. For ESP32-S3, the `mode` option is required and must be set to `quad` or `octal`.
40+ Typically on ESP32-S3 modules, a 2MB PSRAM will use quad mode, while 8 or 16MB will use octal mode, but check
41+ the datasheet for the module you are using to be sure.
42+
43+ > [!WARNING]
44+ > If you choose the wrong mode for your board, the PSRAM will not work.
45+
46+ # # Notes
3447
3548- Not all ESP32 modules have PSRAM available. If you are unsure, consult the datasheet of your module.
3649- Not all modules support all modes and speeds.
3750- 120MHz is not available with octal mode, unless using ESP-IDF and the `enable_idf_experimental_features` is enabled
3851 in the ESP-IDF platform [Advanced Configuration](#esp32-advanced_configuration).
39-
40- - If you choose the wrong mode for your board, the PSRAM will not work.
4152- Configuring an unsupported speed will usually result in the PSRAM running at the default speed.
42- - Typically on ESP32-S3 modules, a 2MB PSRAM will use quad mode, while 8 or 16MB will use octal mode.
4353
4454# # See Also
0 commit comments