Go to the documentation of this file.
52 #ifndef __APP_GRAPHICS_OSPI_H__
53 #define __APP_GRAPHICS_OSPI_H__
200 #define OSPI_PSRAM_DEVICE_ID 0x13
201 #define OSPI_PSRAM_MIN_XIP_ADDRESS OSPI0_XIP_BASE
202 #define OSPI_PSRAM_MAX_XIP_ADDRESS (OSPI0_XIP_BASE + 0x7FFFFF)
203 #define OSPI_PSRAM_BYTE_SIZE (0x800000)
208 #define PSRAM_INIT_PARAMS_Default \
210 .ospi_freq = OSPI_CLOCK_FREQ_48MHz, \
211 .drv_strength = OSPI_PSRAM_DRV_STR_ONE_EIGHTH, \
212 .rd_lc = OSPI_PSRAM_RD_LATENCY_3, \
213 .wr_lc = OSPI_PSRAM_WR_LATENCY_3, \
215 .is_read_prefetch = 0, \
329 ll_ospi_x_set_read_prefetch(OSPI0, enable ? 1 : 0);
340 return ll_ospi_x_is_read_prefetch_enabled(OSPI0);
@ OSPI_PSRAM_WR_LATENCY_4
uint32_t app_graphics_ospi_get_base_address(void)
Get the OSPI.PSRAM Base Address.
#define OSPI_PSRAM_MIN_XIP_ADDRESS
@ OSPI_PSRAM_DRV_STR_HALF
app_ospi_clock_freq_e ospi_freq
@ OSPI_PSRAM_DRV_STR_ONE_FORTH
app_ospi_work_state_e
PSRAM Work Mode Enumerations definition.
void app_graphics_ospi_register_psram_reload_func(psram_reload_func_t psram_reload_func)
Register the OSPI reload function for PSRAM recovery after deep sleep.
void app_graphics_ospi_pasr_update(uint32_t psram_addr)
Set Partial Refresh Array for OSPI PSRAM with PSRAM used address.
@ OSPI_PSRAM_RD_LATENCY_6
app_ospi_access_mode_e
PSRAM Access Mode Enumerations definition.
@ OSPI_PSRAM_WR_LATENCY_7
Header file containing functions prototypes of SPI LL library.
void app_graphics_ospi_set_sleep_state(app_ospi_work_state_e state)
Set the OSPI low power state for system sleep.
app_ospi_psram_wr_latency_e wr_lc
app_ospi_psram_rd_latency_e
PSRAM Read Latency Enumerations definition.
void app_graphics_ospi_set_pasr(app_ospi_pasr_e area)
Set Partial Refresh Array for OSPI PSRAM.
app_ospi_phy_delay_e
OSPI PHY Delay Value Enumerations definition.
@ OSPI_PSRAM_RD_LATENCY_4
app_ospi_pasr_e
PSRAM Partial Array Refresh Enumerations definition.
void(* ospi_irq_handler)(void)
Define IRQ handler for OSPI.
app_ospi_work_state_e app_graphics_ospi_get_sleep_state(void)
Get the OSPI low power state for system sleep.
void(* psram_reload_func_t)(void)
Define PSRAM reload function for OSPI.
@ OSPI_PSRAM_WR_LATENCY_6
app_ospi_psram_wr_latency_e
PSRAM Write Latency Enumerations definition.
@ OSPI_PSRAM_RD_LATENCY_3
Define init params for OSPI.
__STATIC_INLINE bool app_graphics_is_ospi_address(uint32_t address)
Check address is located at ospi.psram or not.
app_ospi_psram_drv_strength_e
PSRAM Drive Strength Enumerations definition.
app_ospi_psram_rd_latency_e rd_lc
uint16_t app_graphics_ospi_init(app_graphics_ospi_params_t *p_params)
Initialize the APP OSPI DRIVER according to the specified parameters.
void app_graphics_ospi_set_power_state(app_ospi_work_state_e state)
Set the OSPI work state.
#define OSPI_PSRAM_MAX_XIP_ADDRESS
uint32_t app_graphics_ospi_get_byte_size(void)
Get the OSPI.PSRAM Size in Bytes.
@ OSPI_PSRAM_RD_LATENCY_7
__STATIC_INLINE bool app_graphics_ospi_get_read_prefetch(void)
Get read prefetch state of OSPI PSRAM.
__STATIC_INLINE void app_graphics_ospi_set_read_prefetch(bool enable)
Enable/Disable read prefetch of OSPI PSRAM.
@ OSPI_PSRAM_DRV_STR_FULL
void app_graphics_ospi_deinit(void)
De-Initialize the APP OSPI DRIVER .
app_ospi_psram_drv_strength_e drv_strength
app_ospi_clock_freq_e
OSPI Clock Frequency Enumerations definition.
@ OSPI_PSRAM_DRV_STR_ONE_EIGHTH
Header file of app driver error code.
Header file of app driver config code.
@ OSPI_PSRAM_WR_LATENCY_5
@ OSPI_PSRAM_WR_LATENCY_3
void app_graphics_ospi_reset(void)
Reset the OSPI Controller.
@ OSPI_PSRAM_RD_LATENCY_5