![]() |
xilisf_v5_14
Xilinx SDK Drivers API Documentation
|
Functions | |
int | XIsf_Initialize (XIsf *InstancePtr, XIsf_Iface *SpiInstPtr, u8 SlaveSelect, u8 *WritePtr) |
This API when called initializes the SPI interface with default settings. More... | |
int | XIsf_GetStatus (XIsf *InstancePtr, u8 *ReadPtr) |
This API reads the Serial Flash Status Register. More... | |
int | XIsf_GetStatusReg2 (XIsf *InstancePtr, u8 *ReadPtr) |
This API reads the Serial Flash Status Register 2. More... | |
int | XIsf_GetDeviceInfo (XIsf *InstancePtr, u8 *ReadPtr) |
This API reads the Joint Electron Device Engineering Council (JEDEC) information of the Serial Flash. More... | |
u32 | GetRealAddr (XIsf_Iface *QspiPtr, u32 Address) |
Function to get the real address of flash in case dual parallel and stacked configuration. More... | |
int | XIsf_Write (XIsf *InstancePtr, XIsf_WriteOperation Operation, void *OpParamPtr) |
This API writes the data to the Serial Flash. More... | |
int | XIsf_Read (XIsf *InstancePtr, XIsf_ReadOperation Operation, void *OpParamPtr) |
This API reads the data from the Serial Flash. More... | |
int | XIsf_Erase (XIsf *InstancePtr, XIsf_EraseOperation Operation, u32 Address) |
This API erases the contents of the specified memory in the Serial Flash. More... | |
int | XIsf_SectorProtect (XIsf *InstancePtr, XIsf_SpOperation Operation, u8 *BufferPtr) |
This API is used for performing Sector Protect related operations. More... | |
int | XIsf_Ioctl (XIsf *InstancePtr, XIsf_IoctlOperation Operation) |
This API configures and controls the Intel, STM, Winbond and Spansion Serial Flash. More... | |
int | XIsf_WriteEnable (XIsf *InstancePtr, u8 WriteEnable) |
This API Enables/Disables writes to the Intel, STM, Winbond and Spansion Serial Flash. More... | |
void | XIsf_RegisterInterface (XIsf *InstancePtr) |
This API registers the interface SPI/SPI PS/QSPI PS. More... | |
int | XIsf_SetSpiConfiguration (XIsf *InstancePtr, XIsf_Iface *SpiInstPtr, u32 Options, u8 PreScaler) |
This API sets the configuration of SPI. More... | |
void | XIsf_SetStatusHandler (XIsf *InstancePtr, XIsf_Iface *XIfaceInstancePtr, XIsf_StatusHandler XilIsf_Handler) |
This API is to set the Status Handler when an interrupt is registered. More... | |
void | XIsf_IfaceHandler (void *CallBackRef, u32 StatusEvent, unsigned int ByteCount) |
This API is the handler which performs processing for the QSPI driver. More... | |
u32 GetRealAddr | ( | XIsf_Iface * | QspiPtr, |
u32 | Address | ||
) |
Function to get the real address of flash in case dual parallel and stacked configuration.
Function to get the real address of flash in case dual parallel and stacked configuration.
This functions translates the address based on the type of interconnection. In case of stacked, this function asserts the corresponding slave select.
QspiPtr | is a pointer to XIsf_Iface instance to be worked on. |
Address | which is to be accessed (for erase, write or read) |
int XIsf_Erase | ( | XIsf * | InstancePtr, |
XIsf_EraseOperation | Operation, | ||
u32 | Address | ||
) |
This API erases the contents of the specified memory in the Serial Flash.
InstancePtr | Pointer to the XIsf instance. |
Operation | Type of Erase operation to be performed on the Serial Flash. The different operations are
|
Address | Address of the Page/Block/Sector to be erased. The address can be either Page address, Block address or Sector address based on the Erase operation to be performed. |
int XIsf_GetDeviceInfo | ( | XIsf * | InstancePtr, |
u8 * | ReadPtr | ||
) |
This API reads the Joint Electron Device Engineering Council (JEDEC) information of the Serial Flash.
InstancePtr | Pointer to the XIsf instance. |
ReadPtr | Pointer to the buffer where the Device information is copied. |
References BYTE1, BYTE2, BYTE3, BYTE4, BYTE5, XISF_CMD_ISFINFO_READ, XISF_DUMMYBYTE, and XISF_INFO_READ_BYTES.
Referenced by XIsf_Initialize().
int XIsf_GetStatus | ( | XIsf * | InstancePtr, |
u8 * | ReadPtr | ||
) |
This API reads the Serial Flash Status Register.
InstancePtr | Pointer to the XIsf instance. |
ReadPtr | Pointer to the memory where the Status Register content is copied. |
References BYTE1, BYTE2, XISF_CMD_STATUSREG_READ, XISF_DUMMYBYTE, and XISF_STATUS_RDWR_BYTES.
int XIsf_GetStatusReg2 | ( | XIsf * | InstancePtr, |
u8 * | ReadPtr | ||
) |
This API reads the Serial Flash Status Register 2.
InstancePtr | Pointer to the XIsf instance. |
ReadPtr | Pointer to the memory where the Status Register content is copied. |
References BYTE1, BYTE2, XISF_CMD_STATUSREG2_READ, XISF_CMD_STATUSREG_READ, XISF_DUMMYBYTE, and XISF_STATUS_RDWR_BYTES.
void XIsf_IfaceHandler | ( | void * | CallBackRef, |
u32 | StatusEvent, | ||
unsigned int | ByteCount | ||
) |
This API is the handler which performs processing for the QSPI driver.
It is called from an interrupt context such that the amount of processing performed should be minimized. It is called when a transfer of QSPI data completes or an error occurs.
This handler provides an example of how to handle QSPI interrupts but is application specific.
CallBackRef | Reference passed to the handler. |
StatusEvent | Status of the QSPI . |
ByteCount | Number of bytes transferred. |
References XIsf_TransferInProgress.
Referenced by XIsf_SetStatusHandler().
int XIsf_Initialize | ( | XIsf * | InstancePtr, |
XIsf_Iface * | SpiInstPtr, | ||
u8 | SlaveSelect, | ||
u8 * | WritePtr | ||
) |
This API when called initializes the SPI interface with default settings.
With custom settings, user should call XIsf_SetSpiConfiguration() and then call this API. The geometry of the underlying Serial Flash is determined by reading the Joint Electron Device Engineering Council (JEDEC) Device Information and the Status Register of the Serial Flash.
InstancePtr | Pointer to the XIsf instance. |
SpiInstPtr | Pointer to XIsf_Iface instance to be worked on. |
SlaveSelect | It is a 32-bit mask with a 1 in the bit position of slave being selected. Only one slave can be selected at a time. |
WritePtr | Pointer to the buffer allocated by the user to be used by the In-system and Serial Flash Library to perform any read/write operations on the Serial Flash device. User applications must pass the address of this buffer for the Library to work.
|
(((XPAR_XISF_FLASH_FAMILY==INTEL) || \ (XPAR_XISF_FLASH_FAMILY==STM) || \ (XPAR_XISF_FLASH_FAMILY == SST) || \ (XPAR_XISF_FLASH_FAMILY == WINBOND) || \ (XPAR_XISF_FLASH_FAMILY == SPANSION)) && \ ((!defined(XPAR_XISF_INTERFACE_PSQSPI)) && \ (!defined(XPAR_XISF_INTERFACE_QSPIPSU)) && \ (!defined(XPAR_XISF_INTERFACE_OSPIPSV))))
(((XPAR_XISF_FLASH_FAMILY == WINBOND) || \ (XPAR_XISF_FLASH_FAMILY == SPANSION)) && \ (defined(XPAR_XISF_INTERFACE_PSQSPI) || \ defined(XPAR_XISF_INTERFACE_QSPIPSU) || \ defined(XPAR_XISF_INTERFACE_OSPIPSV)))
References XIsf_GetDeviceInfo(), XISF_INFO_EXTRA_BYTES, XISF_INFO_READ_BYTES, and XIsf_SetSpiConfiguration().
int XIsf_Ioctl | ( | XIsf * | InstancePtr, |
XIsf_IoctlOperation | Operation | ||
) |
This API configures and controls the Intel, STM, Winbond and Spansion Serial Flash.
InstancePtr | Pointer to the XIsf instance. |
Operation | Type of Control operation to be performed on the Serial Flash. The different control operations are
|
((XPAR_XISF_FLASH_FAMILY==INTEL) || (XPAR_XISF_FLASH_FAMILY==STM) \ (XPAR_XISF_FLASH_FAMILY == WINBOND) || (XPAR_XISF_FLASH_FAMILY == SPANSION))
References BYTE1, XISF_CMD_CLEAR_SRFAIL_FLAGS, XISF_CMD_DEEP_POWER_DOWN, XISF_CMD_ENABLE_HPM, XISF_CMD_RELEASE_FROM_DPD, XISF_HPM_BYTES, and XISF_IOCTL_BYTES.
int XIsf_Read | ( | XIsf * | InstancePtr, |
XIsf_ReadOperation | Operation, | ||
void * | OpParamPtr | ||
) |
This API reads the data from the Serial Flash.
InstancePtr | Pointer to the XIsf instance. |
Operation | Type of the read operation to be performed on the Serial Flash. The different operations are
|
OpParamPtr | Pointer to structure variable which contains operational parameter of specified operation. This parameter type is dependent on the type of Operation to be performed. |
((XPAR_XISF_FLASH_FAMILY == WINBOND) || \ (XPAR_XISF_FLASH_FAMILY == STM) || \ (XPAR_XISF_FLASH_FAMILY == SPANSION))
References XISF_CMD_DUAL_IO_FAST_READ, XISF_CMD_DUAL_OP_FAST_READ, XISF_CMD_FAST_READ, XISF_CMD_FAST_READ_4BYTE, XISF_CMD_OCTAL_IO_FAST_READ_4B, XISF_CMD_QUAD_IO_FAST_READ, XISF_CMD_QUAD_OP_FAST_READ, and XISF_CMD_VOLATILE_CONFIG_READ.
void XIsf_RegisterInterface | ( | XIsf * | InstancePtr | ) |
This API registers the interface SPI/SPI PS/QSPI PS.
InstancePtr | Pointer to the XIsf instance. |
Referenced by XIsf_SetSpiConfiguration().
int XIsf_SectorProtect | ( | XIsf * | InstancePtr, |
XIsf_SpOperation | Operation, | ||
u8 * | BufferPtr | ||
) |
This API is used for performing Sector Protect related operations.
InstancePtr | Pointer to the XIsf instance. |
Operation | Type of Sector Protect operation to be performed on the Serial Flash. The different operations are
|
BufferPtr | Pointer to the memory where the SPR content is read to/written from. This argument can be NULL if the Operation is SprErase, SpEnable and SpDisable. |
int XIsf_SetSpiConfiguration | ( | XIsf * | InstancePtr, |
XIsf_Iface * | SpiInstPtr, | ||
u32 | Options, | ||
u8 | PreScaler | ||
) |
This API sets the configuration of SPI.
This will set the options and clock prescaler (if applicable).
InstancePtr | Pointer to the XIsf instance. |
SpiInstPtr | Pointer to XIsf_Iface instance to be worked on. |
Options | Specified options to be set. |
PreScaler | Value of the clock prescaler to set. |
References XIsf_RegisterInterface().
Referenced by XIsf_Initialize().
void XIsf_SetStatusHandler | ( | XIsf * | InstancePtr, |
XIsf_Iface * | XIfaceInstancePtr, | ||
XIsf_StatusHandler | XilIsf_Handler | ||
) |
This API is to set the Status Handler when an interrupt is registered.
InstancePtr | Pointer to the XIsf Instance. |
XIfaceInstancePtr | Pointer to the XIsf_Iface instance to be worked on. |
XilIsf_Handler | Status handler for the application. |
References XIsf_IfaceHandler().
int XIsf_Write | ( | XIsf * | InstancePtr, |
XIsf_WriteOperation | Operation, | ||
void * | OpParamPtr | ||
) |
This API writes the data to the Serial Flash.
InstancePtr | Pointer to the XIsf instance. |
Operation | Type of write operation to be performed on the Serial Flash. The different operations are
|
OpParamPtr | Pointer to a structure variable which contains operational parameters of the specified operation. This parameter type is dependent on value of first argument(Operation). |
(((XPAR_XISF_FLASH_FAMILY == WINBOND) || \ (XPAR_XISF_FLASH_FAMILY == STM) || \ (XPAR_XISF_FLASH_FAMILY == SPANSION)) && \ (!defined(XPAR_XISF_INTERFACE_OSPIPSV)))
References XISF_CMD_DUAL_IP_EXT_PAGE_WRITE, XISF_CMD_DUAL_IP_PAGE_WRITE, XISF_CMD_OCTAL_WRITE_4B, XISF_CMD_PAGEPROG_WRITE, XISF_CMD_PAGEPROG_WRITE_4BYTE, XISF_CMD_QUAD_IP_EXT_PAGE_WRITE, XISF_CMD_QUAD_IP_PAGE_WRITE, and XISF_CMD_VOLATILE_CONFIG_WRITE.
int XIsf_WriteEnable | ( | XIsf * | InstancePtr, |
u8 | WriteEnable | ||
) |
This API Enables/Disables writes to the Intel, STM, Winbond and Spansion Serial Flash.
InstancePtr | Pointer to the XIsf instance. |
WriteEnable | Specifies whether to Enable (XISF_CMD_ENABLE_WRITE) or Disable (XISF_CMD_DISABLE_WRITE) the writes to the Serial Flash. |
((XPAR_XISF_FLASH_FAMILY==INTEL) || (XPAR_XISF_FLASH_FAMILY==STM) \ (XPAR_XISF_FLASH_FAMILY == WINBOND) || \ (XPAR_XISF_FLASH_FAMILY == SPANSION) || \ (XPAR_XISF_FLASH_FAMILY == SST))
References BYTE1, XISF_CMD_DISABLE_WRITE, XISF_CMD_ENABLE_WRITE, XISF_CMD_WRITE_ENABLE_DISABLE_BYTES, XISF_WRITE_DISABLE, and XISF_WRITE_ENABLE.