Available on crate feature
unstable only.Expand description
§PSRAM (Pseudo-static RAM, SPI RAM) driver
§Overview
This module provides support to interface with PSRAM devices connected to the MCU.
PSRAM provides additional external memory to supplement the internal memory of the MCU,
allowing for increased storage capacity and improved performance in certain applications.
The ESP32-S3 can use either Quad SPI or Octal SPI to interface with PSRAM.
esp-hal will try to automatically detect the best option, but manual configuration is also possible and more reliable.
§Examples
§PSRAM as heap memory
This example shows how to use PSRAM as heap-memory via esp-alloc.
ⓘ
extern crate alloc;
use alloc::{string::String, vec::Vec};
// Add PSRAM to the heap.
esp_alloc::psram_allocator!(peripherals.PSRAM, esp_hal::psram);
let mut large_vec: Vec<u32> = Vec::with_capacity(500 * 1024 / 4);
for i in 0..(500 * 1024 / 4) {
large_vec.push((i & 0xff) as u32);
}
let string = String::from("A string allocated in PSRAM");Structs§
- Psram
- Enables externally-connected Pseudo-static RAM.
- Psram
Config - PSRAM configuration
Enums§
- Flash
Freq - Frequency of flash memory
- Psram
Mode - PSRAM interface mode
- Psram
Size - Size of PSRAM
- SpiRam
Freq - Frequency of PSRAM memory
- SpiTiming
Config Core Clock - Core timing configuration