Skip to main content

Module psram

Module psram 

Source
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.

§Examples

§PSRAM as heap memory

This example shows how to use PSRAM as heap-memory via esp-alloc.

The PSRAM example must be built in release mode!
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§

MspiTimingTuningParam
MSPI timing tuning parameters.
Psram
Enables externally-connected Pseudo-static RAM.
PsramConfig
PSRAM configuration

Enums§

FlashFreq
Frequency of flash memory
PsramSize
Size of PSRAM
SpiRamFreq
Frequency of PSRAM memory