Loading...
Searching...
No Matches
psram.h File Reference
#include "pico.h"
#include "hardware/clocks.h"
#include "hardware/flash.h"

Go to the source code of this file.

Macros

#define PARAM_ASSERTIONS_ENABLED_HARDWARE_PSRAM   0
#define PICO_AUTO_DETECT_PSRAM   0
#define PICO_AUTO_DETECT_PSRAM_SIZE   PICO_AUTO_DETECT_PSRAM
#define PICO_AUTO_DETECT_PSRAM_CS   PICO_AUTO_DETECT_PSRAM
#define PICO_AUTO_DETECT_PSRAM_CS_SKIP_DEFAULTS   PICO_AUTO_DETECT_PSRAM_CS
#define PICO_DEFAULT_PSRAM_ID   0x5D
#define PICO_DEFAULT_PSRAM_MAX_FREQ   (133 * MHZ)
#define PICO_DEFAULT_PSRAM_MAX_SELECT   8000
#define PICO_DEFAULT_PSRAM_MIN_DESELECT   18
#define PICO_RUNTIME_INIT_PSRAM   "11080"
#define PICO_RUNTIME_SKIP_INIT_PSRAM   0
#define PICO_RUNTIME_NO_INIT_PSRAM   0
#define psram_or_malloc(group, type, var, size)
 Provide a static PSRAM allocation, or malloc if PSRAM is not available.
#define psram_or_free(var)
 Free a buffer if it is not in PSRAM.

Functions

bool psram_is_available (void)
 Check if PSRAM is available and initialized.
size_t psram_get_size (void)
 Get the size of the PSRAM.
bool psram_check_address (void *addr)
 Check if an address is in available PSRAM.
size_t psram_detect_size (void)
 Detect PSRAM size.
size_t psram_detect_cs_and_size (uint8_t *cs_gpios, size_t num)
 Detect PSRAM chip select pin and size.
int psram_configure_params (uint32_t max_psram_freq, uint32_t max_select_ns, uint32_t min_deselect_ns)
 Configure PSRAM timing parameters.
int psram_set_params (uint32_t divisor, uint32_t rxdelay, uint32_t max_select, uint32_t min_deselect)
 Explicitly set PSRAM timing parameters.
int psram_reinitialize (void)
 Re-initialize PSRAM.
size_t psram_eid_to_size (uint8_t kgd, uint8_t eid)
 Convert PSRAM EID to size.