![]() |
qspips
Xilinx SDK Drivers API Documentation
|
Data Structures | |
struct | XQspiPs_Config |
struct | XQspiPs |
Macros | |
#define | XQspiPs_SetSlaveIdle(InstancePtr, RegisterValue) |
#define | XQspiPs_GetSlaveIdle(InstancePtr) |
#define | XQspiPs_SetTXWatermark(InstancePtr, RegisterValue) |
#define | XQspiPs_GetTXWatermark(InstancePtr) XQspiPs_In32((InstancePtr->Config.BaseAddress) + XQSPIPS_TXWR_OFFSET) |
#define | XQspiPs_SetRXWatermark(InstancePtr, RegisterValue) |
#define | XQspiPs_GetRXWatermark(InstancePtr) XQspiPs_In32((InstancePtr->Config.BaseAddress) + XQSPIPS_RXWR_OFFSET) |
#define | XQspiPs_Enable(InstancePtr) |
#define | XQspiPs_Disable(InstancePtr) XQspiPs_Out32((InstancePtr->Config.BaseAddress) + XQSPIPS_ER_OFFSET, 0) |
#define | XQspiPs_SetLqspiConfigReg(InstancePtr, RegisterValue) |
#define | XQspiPs_GetLqspiConfigReg(InstancePtr) |
Configuration options | |
The following options are supported to enable/disable certain features of an QSPI device. Each of the options is a bit mask, so more than one may be specified. The Active Low Clock option configures the device's clock polarity. Setting this option means the clock is active low and the SCK signal idles high. By default, the clock is active high and SCK idles low. The Clock Phase option configures the QSPI device for one of two transfer formats. A clock phase of 0, the default, means data is valid on the first SCK edge (rising or falling) after the slave select (SS) signal has been asserted. A clock phase of 1 means data is valid on the second SCK edge (rising or falling) after SS has been asserted. The QSPI Force Slave Select option is used to enable manual control of the slave select signal. 0: The SPI_SS signal is controlled by the QSPI controller during transfers. (Default) 1: The SPI_SS signal is forced active (driven low) regardless of any transfers in progress. NOTE: The driver will handle setting and clearing the Slave Select when the user sets the "FORCE_SSELECT_OPTION". Using this option will allow the QSPI clock to be set to a faster speed. If the QSPI clock is too fast, the processor cannot empty and refill the FIFOs before the TX FIFO is empty When the QSPI hardware is controlling the Slave Select signals, this will cause slave to be de-selected and terminate the transfer. The Manual Start option is used to enable manual control of the Start command to perform data transfer. 0: The Start command is controlled by the QSPI controller during transfers(Default). Data transmission starts as soon as there is data in the TXFIFO and stalls when the TXFIFO is empty 1: The Start command must be issued by software to perform data transfer. Bit 15 of Configuration register is used to issue Start command. This bit must be set whenever TXFIFO is filled with new data. NOTE: The driver will set the Manual Start Enable bit in Configuration Register, if Manual Start option is selected. Software will issue Manual Start command whenever TXFIFO is filled with data. When there is no further data, driver will clear the Manual Start Enable bit. | |
QSPI Clock Prescaler options | |
The QSPI Clock Prescaler Configuration bits are used to program master mode bit rate. The bit rate can be programmed in divide-by-two decrements from pclk/2 to pclk/256. | |
Callback events | |
These constants specify the handler events that are passed to a handler from the driver. These constants are not bit masks such that only one will be passed at a time to the handler. | |
Flash commands | |
The following constants define most of the commands supported by flash devices. Users can add more commands supported by the flash devices | |
Instruction size | |
The following constants define numbers 1 to 4. Used to identify whether TXD0,1,2 or 3 is to be used. | |
ConnectionMode | |
The following constants are the possible values of ConnectionMode in Config structure. | |
FIFO threshold value | |
This is the Rx FIFO threshold (in words) that was found to be most optimal in terms of performance |
Typedefs | |
typedef void(* | XQspiPs_StatusHandler) (void *CallBackRef, u32 StatusEvent, unsigned ByteCount) |
Functions | |
XQspiPs_Config * | XQspiPs_LookupConfig (u16 DeviceId) |
int | XQspiPs_CfgInitialize (XQspiPs *InstancePtr, XQspiPs_Config *ConfigPtr, u32 EffectiveAddr) |
void | XQspiPs_Reset (XQspiPs *InstancePtr) |
void | XQspiPs_Abort (XQspiPs *InstancePtr) |
int | XQspiPs_Transfer (XQspiPs *InstancePtr, u8 *SendBufPtr, u8 *RecvBufPtr, unsigned ByteCount) |
int | XQspiPs_PolledTransfer (XQspiPs *InstancePtr, u8 *SendBufPtr, u8 *RecvBufPtr, unsigned ByteCount) |
int | XQspiPs_LqspiRead (XQspiPs *InstancePtr, u8 *RecvBufPtr, u32 Address, unsigned ByteCount) |
int | XQspiPs_SetSlaveSelect (XQspiPs *InstancePtr) |
void | XQspiPs_SetStatusHandler (XQspiPs *InstancePtr, void *CallBackRef, XQspiPs_StatusHandler FuncPtr) |
void | XQspiPs_InterruptHandler (void *InstancePtr) |
int | XQspiPs_SelfTest (XQspiPs *InstancePtr) |
int | XQspiPs_SetOptions (XQspiPs *InstancePtr, u32 Options) |
u32 | XQspiPs_GetOptions (XQspiPs *InstancePtr) |
int | XQspiPs_SetClkPrescaler (XQspiPs *InstancePtr, u8 Prescaler) |
u8 | XQspiPs_GetClkPrescaler (XQspiPs *InstancePtr) |
int | XQspiPs_SetDelays (XQspiPs *InstancePtr, u8 DelayNss, u8 DelayBtwn, u8 DelayAfter, u8 DelayInit) |
void | XQspiPs_GetDelays (XQspiPs *InstancePtr, u8 *DelayNss, u8 *DelayBtwn, u8 *DelayAfter, u8 *DelayInit) |