ospipsv
Vitis Drivers API Documentation
xospipsv.h File Reference

Data Structures

struct  XOspiPsv_Msg
 This typedef contains configuration information for a flash message. More...
 
struct  XOspiPsv_Config
 This typedef contains configuration information for the device. More...
 
struct  XOspiPsv
 The XOspiPsv driver instance data. More...
 

Macros

#define XOSPIPSV_H_
 < prevent circular inclusions More...
 
#define XOSPIPSV_RXADDR_OVER_32BIT   0x100000000U
 < Macro used for more than 32-bit address More...
 
Configuration options
#define XOSPIPSV_DAC_EN_OPTION   0x1U
 User configuration options. More...
 
#define XOSPIPSV_IDAC_EN_OPTION   0x2U
 
#define XOSPIPSV_STIG_EN_OPTION   0x4U
 
#define XOSPIPSV_CLK_POL_OPTION   0x8U
 
#define XOSPIPSV_CLK_PHASE_OPTION   0x10U
 
#define XOSPIPSV_PHY_EN_OPTION   0x20U
 
#define XOSPIPSV_LEGIP_EN_OPTION   0x40U
 
#define XOSPIPSV_DTR_EN_OPTION   0x80U
 
#define XOSPIPSV_CRC_EN_OPTION   0x100U
 
#define XOSPIPSV_DB_OP_EN_OPTION   0x200U
 
Low-level memory read/write
#define XOspiPsv_ReadReg(BaseAddress, RegOffset)   Xil_In32((BaseAddress) + (u32)(RegOffset))
 Low level macros to read/write memory. More...
 
#define XOspiPsv_WriteReg(BaseAddress, RegOffset, RegisterValue)   Xil_Out32((BaseAddress) + (u32)(RegOffset), (u32)(RegisterValue))
 
Modes of operation selection
#define XOSPIPSV_IDAC_MODE   0x0U
 Macros to select INDAC and DAC modes. More...
 
#define XOSPIPSV_DAC_MODE   0x1U
 
Transfer type selection
#define XOSPIPSV_MSG_FLAG_RX   0x2U
 Macros to select RX and TX transfer flags. More...
 
#define XOSPIPSV_MSG_FLAG_TX   0x4U
 
Prototype(Bus width: Cmd_Addr_Data) selection
#define XOSPIPSV_READ_1_1_1   0U
 Macros to select Read and Write prototype. More...
 
#define XOSPIPSV_READ_1_1_8   3U
 
#define XOSPIPSV_READ_1_8_8   4U
 
#define XOSPIPSV_READ_8_8_8   5U
 
#define XOSPIPSV_READ_8_0_8   6U
 
#define XOSPIPSV_WRITE_1_1_1   0U
 
#define XOSPIPSV_WRITE_1_0_1   1U
 
#define XOSPIPSV_WRITE_1_1_8   3U
 
#define XOSPIPSV_WRITE_1_8_8   4U
 
#define XOSPIPSV_WRITE_8_8_8   5U
 
#define XOSPIPSV_WRITE_8_0_0   6U
 
#define XOSPIPSV_WRITE_8_8_0   7U
 
#define XOSPIPSV_WRITE_8_0_8   8U
 
Chip Select selection
#define XOSPIPSV_SELECT_FLASH_CS0   0
 Macros to select CS0 and CS1. More...
 
#define XOSPIPSV_SELECT_FLASH_CS1   1
 
Prescaler selection
#define XOSPIPSV_CLK_PRESCALE_2   0U
 Macros to select different baud rate divisors. More...
 
#define XOSPIPSV_CLK_PRESCALE_4   1U
 
#define XOSPIPSV_CLK_PRESCALE_6   2U
 
#define XOSPIPSV_CLK_PRESCALE_8   3U
 
#define XOSPIPSV_CLK_PRESCALE_10   4U
 
#define XOSPIPSV_CLK_PRESCALE_12   5U
 
#define XOSPIPSV_CLK_PRESCALE_14   6U
 
#define XOSPIPSV_CLK_PRESCALE_16   7U
 
#define XOSPIPSV_CLK_PRESCALE_18   8U
 
#define XOSPIPSV_CLK_PRESCALE_20   9U
 
#define XOSPIPSV_CLK_PRESCALE_22   10U
 
#define XOSPIPSV_CLK_PRESCALE_24   11U
 
#define XOSPIPSV_CLK_PRESCALE_26   12U
 
#define XOSPIPSV_CLK_PRESCALE_28   13U
 
#define XOSPIPSV_CLK_PRESCALE_30   14U
 
#define XOSPIPSV_CLK_PRESCALE_32   15U
 
#define XOSPIPSV_CR_PRESC_MAXIMUM   15U
 
Default configuration selection
#define XOSPIPSV_NO_SLAVE_SELCT_VALUE   0xFU
 Macros to select default OSPI configuration. More...
 
#define XOSPIPSV_DISABLE_DAC_VALUE   0x0U
 
#define XOSPIPSV_SPI_DISABLE_VALUE   0x0U
 
#define XOSPIPSV_CONFIG_INIT_VALUE
 
#define XOSPIPSV_POLL_CNT_FLD_PHY   0x3U
 
#define XOSPIPSV_POLL_CNT_FLD_NON_PHY   0x1U
 
#define XOSPIPSV_MIN_PHY_FREQ   50000000
 
#define XOSPIPSV_DDR_STATS_REG_DUMMY   0x8U
 
#define XOSPIPSV_REMAP_ADDR_VAL   0x40000000U
 
#define XOSPIPSV_NON_PHY_RD_DLY   0x1U
 
Edge mode selection
#define XOSPIPSV_EDGE_MODE_SDR_PHY   0x0U
 Macros to select different edge modes like SDR+NON-PHY, SDR+PHY and DDR+PHY. More...
 
#define XOSPIPSV_EDGE_MODE_SDR_NON_PHY   0x1U
 
#define XOSPIPSV_EDGE_MODE_DDR_PHY   0x2U
 
DLL delay selection
#define XOSPIPSV_SDR_TX_VAL   0x5U
 Macros to select TX DLL delays. More...
 
#define XOSPIPSV_DDR_TX_VAL   0x0U
 
#define XOSPIPSV_DDR_TX_VAL_MASTER   0x1EU
 
#define XOSPIPSV_SDR_TX_VAL_MASTER   0x3CU
 
#define XOSPIPSV_DLL_MAX_TAPS   0x7FU
 
OSPI Device reset selection
#define XOSPIPSV_HWPIN_RESET   0x0U
 Macros to select HWPIN and INBAND resets. More...
 
#define XOSPIPSV_INBAND_RESET   0x1U
 
DLL mode selection
#define XOSPIPSV_DLL_BYPASS_MODE   0x0U
 Macros to select DLL BYPASS and MASTER modes. More...
 
#define XOSPIPSV_DLL_MASTER_MODE   0x1U
 
Connection mode selection
#define XOSPIPSV_CONNECTION_MODE_SINGLE   0x0U
 Macros to select SINGLE and STACKED connection modes. More...
 
#define XOSPIPSV_CONNECTION_MODE_STACKED   0x1U
 
Dual Byte opcode selection
#define XOSPIPSV_DUAL_BYTE_OP_DISABLE   0x0U
 Macros to enable/disable Dual Byte opcode. More...
 
#define XOSPIPSV_DUAL_BYTE_OP_ENABLE   0x1U
 

Typedefs

typedef void(* XOspiPsv_StatusHandler )(void *CallBackRef, u32 StatusEvent)
 The handler data type allows the user to define a callback function to handle the asynchronous processing for the OSPIPSV device. More...
 

Functions

XOspiPsv_ConfigXOspiPsv_LookupConfig (u16 DeviceId)
 Looks up the device configuration based on the unique device ID. More...
 
u32 XOspiPsv_CfgInitialize (XOspiPsv *InstancePtr, const XOspiPsv_Config *ConfigPtr)
 Initializes a specific XOspiPsv instance such that the driver is ready to use. More...
 
void XOspiPsv_Reset (XOspiPsv *InstancePtr)
 This function reset the configuration register. More...
 
u32 XOspiPsv_SetClkPrescaler (XOspiPsv *InstancePtr, u8 Prescaler)
 Configures the clock according to the prescaler passed. More...
 
u32 XOspiPsv_SelectFlash (XOspiPsv *InstancePtr, u8 chip_select)
 This function should be used to tell the OSPIPSV driver the HW flash configuration being used. More...
 
u32 XOspiPsv_SetOptions (XOspiPsv *InstancePtr, u32 Options)
 This function sets the options for the OSPIPSV device driver.The options control how the device behaves relative to the OSPIPSV bus. More...
 
u32 XOspiPsv_GetOptions (const XOspiPsv *InstancePtr)
 This function gets the options for the OSPIPSV device. More...
 
u32 XOspiPsv_PollTransfer (XOspiPsv *InstancePtr, XOspiPsv_Msg *Msg)
 This function performs a transfer on the bus in polled mode. More...
 
u32 XOspiPsv_IntrTransfer (XOspiPsv *InstancePtr, XOspiPsv_Msg *Msg)
 This function performs a transfer on the bus in interrupt mode. More...
 
u32 XOspiPsv_IntrHandler (XOspiPsv *InstancePtr)
 This function handles interrupt based transfers. More...
 
void XOspiPsv_SetStatusHandler (XOspiPsv *InstancePtr, void *CallBackRef, XOspiPsv_StatusHandler FuncPointer)
 Sets the status callback function, the status handler, which the driver calls when it encounters conditions that should be reported to upper layer software. More...
 
u32 XOspiPsv_SetSdrDdrMode (XOspiPsv *InstancePtr, u32 Mode)
 Configures the edge mode (SDR or DDR) More...
 
void XOspiPsv_ConfigureAutoPolling (const XOspiPsv *InstancePtr, u32 FlashMode)
 Configures how the controller will poll the device following a write transfer in DAC mode. More...
 
void XOspiPsv_Idle (const XOspiPsv *InstancePtr)
 Stops the transfer of data to internal DST FIFO from stream interface and also stops the issuing of new write commands to memory. More...
 
u32 XOspiPsv_DeviceReset (u8 Type)
 This function reset the OSPI flash device. More...
 
u32 XOspiPsv_StartDmaTransfer (XOspiPsv *InstancePtr, XOspiPsv_Msg *Msg)
 This function start a DMA transfer. More...
 
u32 XOspiPsv_CheckDmaDone (XOspiPsv *InstancePtr)
 This function check for DMA transfer complete. More...
 
u32 XOspiPsv_SetDllDelay (XOspiPsv *InstancePtr)
 Configure TX and RX DLL Delay. More...
 
u32 XOspiPsv_ConfigDualByteOpcode (XOspiPsv *InstancePtr, u8 Enable)
 This function configures the dual-byte opcode mode. More...
 

Variables

XOspiPsv_Config XOspiPsv_ConfigTable []
 The configuration table for devices. More...