xilisf_v5_14
Xilinx SDK Drivers API Documentation
Library-APIs

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...
 

Function Documentation

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.

Parameters
QspiPtris a pointer to XIsf_Iface instance to be worked on.
Addresswhich is to be accessed (for erase, write or read)
Returns
RealAddr is the translated address - for single it is unchanged for stacked, the lower flash size is subtracted for parallel the address is divided by 2.
Note
None.
int XIsf_Erase ( XIsf *  InstancePtr,
XIsf_EraseOperation  Operation,
u32  Address 
)

This API erases the contents of the specified memory in the Serial Flash.

Parameters
InstancePtrPointer to the XIsf instance.
OperationType of Erase operation to be performed on the Serial Flash. The different operations are
  • XISF_PAGE_ERASE: Page Erase
  • XISF_BLOCK_ERASE: Block Erase
  • XISF_SECTOR_ERASE: Sector Erase
  • XISF_BULK_ERASE: Bulk Erase
AddressAddress 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.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if it fails.
Note
  • The erased bytes will read as 0xFF.
  • For Intel, STM, Winbond or Spansion Serial Flash the user application must call XIsf_WriteEnable() API by passing XISF_WRITE_ENABLE as an argument before calling XIsf_Erase() API.
  • Atmel Serial Flash support Page/Block/Sector Erase operations.
  • Intel, Winbond, Numonyx (N25QXX) and Spansion Serial Flash support Sector/Block/Bulk Erase operations.
  • STM (M25PXX) Serial Flash support Sector/Bulk Erase operations.
int XIsf_GetDeviceInfo ( XIsf *  InstancePtr,
u8 *  ReadPtr 
)

This API reads the Joint Electron Device Engineering Council (JEDEC) information of the Serial Flash.

Parameters
InstancePtrPointer to the XIsf instance.
ReadPtrPointer to the buffer where the Device information is copied.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if it fails.
Note
The Device information is stored at the second byte pointed by the ReadPtr.

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.

Parameters
InstancePtrPointer to the XIsf instance.
ReadPtrPointer to the memory where the Status Register content is copied.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if it fails.
Note
The contents of the Status Register is stored at second byte pointed by the ReadPtr.

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.

Parameters
InstancePtrPointer to the XIsf instance.
ReadPtrPointer to the memory where the Status Register content is copied.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if it fails.
Note
The contents of the Status Register 2 is stored at the second byte pointed by the ReadPtr. This operation is available only in Winbond Serial Flash.

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.

Parameters
CallBackRefReference passed to the handler.
StatusEventStatus of the QSPI .
ByteCountNumber of bytes transferred.
Returns
None
Note
None.

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.

Parameters
InstancePtrPointer to the XIsf instance.
SpiInstPtrPointer to XIsf_Iface instance to be worked on.
SlaveSelectIt 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.
WritePtrPointer 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.
  • Write operations :
    • The size of this buffer should be equal to the Number of bytes to be written to the Serial Flash + XISF_CMD_MAX_EXTRA_BYTES.
    • The size of this buffer should be large enough for usage across all the applications that use a common instance of the Serial Flash.
    • A minimum of one byte and a maximum of ISF_PAGE_SIZE bytes can be written to the Serial Flash, through a single Write operation.
  • Read operations :
    • The size of this buffer should be equal to XISF_CMD_MAX_EXTRA_BYTES, if the application only reads from the Serial Flash (no write operations).
Returns
- XST_SUCCESS if successful.
  • XST_DEVICE_IS_STOPPED if the device must be started before transferring data.
  • XST_FAILURE, otherwise.
Note
- The XIsf_Initialize() API is a blocking call (for both polled and interrupt modes of the Spi driver). It reads the JEDEC information of the device and waits till the transfer is complete before checking if the information is valid.
  • This library can support multiple instances of Serial Flash at a time, provided they are of the same device family (either Atmel, Intel or STM, Winbond or Spansion) as the device family is selected at compile time.

(((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.

Parameters
InstancePtrPointer to the XIsf instance.
OperationType of Control operation to be performed on the Serial Flash. The different control operations are
  • XISF_RELEASE_DPD: Release from Deep Power Down (DPD) Mode
  • XISF_ENTER_DPD: Enter DPD Mode
  • XISF_CLEAR_SR_FAIL_FLAGS: Clear Status Register Fail Flags
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if i fails.
Note
  • Atmel Serial Flash does not support any of these operations.
  • Intel Serial Flash support Enter/Release from DPD Mode and Clear Status Register Fail Flags.
  • STM, Winbond and Spansion Serial Flash support Enter/Release from DPD Mode.
  • Winbond (W25QXX) Serial Flash support Enable High Performance mode.

((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.

Parameters
InstancePtrPointer to the XIsf instance.
OperationType of the read operation to be performed on the Serial Flash. The different operations are
  • XISF_READ: Normal Read
  • XISF_FAST_READ: Fast Read
  • XISF_PAGE_TO_BUF_TRANS: Page to Buffer Transfer
  • XISF_BUFFER_READ: Buffer Read
  • XISF_FAST_BUFFER_READ: Fast Buffer Read
  • XISF_OTP_READ: One Time Programmable Area (OTP) Read
  • XISF_DUAL_OP_FAST_READ: Dual Output Fast Read
  • XISF_DUAL_IO_FAST_READ: Dual Input/Output Fast Read
  • XISF_QUAD_OP_FAST_READ: Quad Output Fast Read
  • XISF_QUAD_IO_FAST_READ: Quad Input/Output Fast Read
OpParamPtrPointer to structure variable which contains operational parameter of specified operation. This parameter type is dependent on the type of Operation to be performed.
  • Normal Read (XISF_READ), Fast Read (XISF_FAST_READ), One Time Programmable Area Read (XISF_OTP_READ), Dual Output Fast Read (XISF_CMD_DUAL_OP_FAST_READ), Dual Input/ Output Fast Read (XISF_CMD_DUAL_IO_FAST_READ), Quad Output Fast Read (XISF_CMD_QUAD_OP_FAST_READ) and Quad Input/ Output Fast Read (XISF_CMD_QUAD_IO_FAST_READ): The OpParamPtr must be of type struct XIsf_ReadParam. OpParamPtr->Address is start address in the Serial Flash. OpParamPtr->ReadPtr is a pointer to the memory where the data read from the Serial Flash is stored. OpParamPtr->NumBytes is number of bytes to read. OpParamPtr->NumDummyBytes is the number of dummy bytes to be transmitted for the Read command. This parameter is only used in case of Dual and Quad reads. Normal Read and Fast Read operations are supported for Atmel, Intel, STM, Winbond and Spansion Serial Flash. Dual and quad reads are supported for Winbond (W25QXX), Numonyx(N25QXX) and Spansion (S25FL129) quad flash. OTP Read operation is only supported in Intel Serial Flash.
  • Page To Buffer Transfer (XISF_PAGE_TO_BUF_TRANS): The OpParamPtr must be of type struct XIsf_FlashToBufTransferParam . OpParamPtr->BufferNum specifies the internal SRAM Buffer of the Serial Flash. The valid values are XISF_PAGE_BUFFER1 or XISF_PAGE_BUFFER2 XISF_PAGE_BUFFER2 is not valid in case of AT45DB011D Flash as it contains a single buffer. OpParamPtr->Address is start address in the Serial Flash. This operation is only supported in Atmel Serial Flash.
  • Buffer Read (XISF_BUFFER_READ) and Fast Buffer Read(XISF_FAST_BUFFER_READ): The OpParamPtr must be of type struct XIsf_BufferReadParam. OpParamPtr->BufferNum specifies the internal SRAM Buffer of the Serial Flash. The valid values are XISF_PAGE_BUFFER1 or XISF_PAGE_BUFFER2 XISF_PAGE_BUFFER2 is not valid in case of AT45DB011D Flash as it contains a single buffer. OpParamPtr->ReadPtr is pointer to the memory where data read from the SRAM buffer is to be stored. OpParamPtr->ByteOffset is byte offset in the SRAM buffer from where the first byte is read. OpParamPtr->NumBytes is the number of bytes to be read from the Buffer. These operations are supported only in Atmel Serial Flash.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if it fails.
Note
  • Application must fill the structure elements of the third argument and pass its pointer by type casting it with void pointer.
  • The valid data is available from the fourth location pointed to by the ReadPtr for Normal Read and Buffer Read operations.
  • The valid data is available from fifth location pointed to by the ReadPtr for Fast Read, Fast Buffer Read and OTP Read operations.
  • The valid data is available from the (4 + NumDummyBytes)th location pointed to by ReadPtr for Dual/Quad Read operations.

((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.

Parameters
InstancePtrPointer to the XIsf instance.
Returns
None

Referenced by XIsf_SetSpiConfiguration().

int XIsf_SectorProtect ( XIsf *  InstancePtr,
XIsf_SpOperation  Operation,
u8 *  BufferPtr 
)

This API is used for performing Sector Protect related operations.

Parameters
InstancePtrPointer to the XIsf instance.
OperationType of Sector Protect operation to be performed on the Serial Flash. The different operations are
  • XISF_SPR_READ: Read Sector Protection Register
  • XISF_SPR_WRITE: Write Sector Protection Register
  • XISF_SPR_ERASE: Erase Sector Protection Register
  • XISF_SP_ENABLE: Enable Sector Protection
  • XISF_SP_DISABLE: Disable Sector Protection
BufferPtrPointer 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.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if it fails.
Note
  • The SPR content is stored at the fourth location pointed by the BufferPtr when performing XISF_SPR_READ operation.
  • For Intel, STM, Winbond and Spansion Serial Flash, the user application must call the XIsf_WriteEnable() API by passing XISF_WRITE_ENABLE as an argument, before calling the XIsf_SectorProtect() API, for Sector Protect Register Write (XISF_SPR_WRITE) operation.
  • Atmel Flash supports all these Sector Protect operations.
  • Intel, STM, Winbond and Spansion Flash support only Sector Protect Read and Sector Protect Write operations.
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).

Parameters
InstancePtrPointer to the XIsf instance.
SpiInstPtrPointer to XIsf_Iface instance to be worked on.
OptionsSpecified options to be set.
PreScalerValue of the clock prescaler to set.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if it fails.
Note
This API can be called before calling XIsf_Initialize() to initialize the SPI interface in other than default options mode. PreScaler is only applicable to PS SPI/QSPI.

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.

Parameters
InstancePtrPointer to the XIsf Instance.
XIfaceInstancePtrPointer to the XIsf_Iface instance to be worked on.
XilIsf_HandlerStatus handler for the application.
Returns
None
Note
None.

References XIsf_IfaceHandler().

int XIsf_Write ( XIsf *  InstancePtr,
XIsf_WriteOperation  Operation,
void *  OpParamPtr 
)

This API writes the data to the Serial Flash.

Parameters
InstancePtrPointer to the XIsf instance.
OperationType of write operation to be performed on the Serial Flash. The different operations are
  • XISF_WRITE: Normal Write
  • XISF_DUAL_IP_PAGE_WRITE: Dual Input Fast Program
  • XISF_DUAL_IP_EXT_PAGE_WRITE: Dual Input Extended Fast Program
  • XISF_QUAD_IP_PAGE_WRITE: Quad Input Fast Program
  • XISF_QUAD_IP_EXT_PAGE_WRITE: Quad Input Extended Fast Program
  • XISF_AUTO_PAGE_WRITE: Auto Page Write
  • XISF_BUFFER_WRITE: Buffer Write
  • XISF_BUF_TO_PAGE_WRITE_WITH_ERASE: Buffer to Page Transfer with Erase
  • XISF_BUF_TO_PAGE_WRITE_WITHOUT_ERASE: Buffer to Page Transfer without Erase
  • XISF_WRITE_STATUS_REG: Status Register Write
  • XISF_WRITE_STATUS_REG2: 2 byte Status Register Write
  • XISF_OTP_WRITE: OTP Write.
OpParamPtrPointer to a structure variable which contains operational parameters of the specified operation. This parameter type is dependent on value of first argument(Operation).
  • Normal Write(XISF_WRITE), Dual Input Fast Program (XISF_DUAL_IP_PAGE_WRITE), Dual Input Extended Fast Program(XISF_DUAL_IP_EXT_PAGE_WRITE), Quad Input Fast Program(XISF_QUAD_IP_PAGE_WRITE), Quad Input Extended Fast Program (XISF_QUAD_IP_EXT_PAGE_WRITE): The OpParamPtr must be of type struct XIsf_WriteParam. OpParamPtr->Address is the start address in the Serial Flash. OpParamPtr->WritePtr is a pointer to the data to be written to the Serial Flash. OpParamPtr->NumBytes is the number of bytes to be written to Serial Flash. This operation is supported for Atmel, Intel, STM, Winbond and Spansion Serial Flash.
  • Auto Page Write (XISF_AUTO_PAGE_WRITE): The OpParamPtr must be of 32 bit unsigned integer variable. This is the address of page number in the Serial Flash which is to be refreshed. This operation is only supported for Atmel Serial Flash.
  • Buffer Write (XISF_BUFFER_WRITE): The OpParamPtr must be of type struct XIsf_BufferToFlashWriteParam. OpParamPtr->BufferNum specifies the internal SRAM Buffer of the Serial Flash. The valid values are XISF_PAGE_BUFFER1 or XISF_PAGE_BUFFER2. XISF_PAGE_BUFFER2 is not valid in case of AT45DB011D Flash as it contains a single buffer. OpParamPtr->WritePtr is a pointer to the data to be written to the Serial Flash SRAM Buffer. OpParamPtr->ByteOffset is byte offset in the buffer from where the data is to be written. OpParamPtr->NumBytes is number of bytes to be written to the Buffer. This operation is supported only for Atmel Serial Flash.
  • Buffer To Memory Write With Erase (XISF_BUF_TO_PAGE_WRITE_WITH_ERASE)/ Buffer To Memory Write Without Erase (XISF_BUF_TO_PAGE_WRITE_WITHOUT_ERASE): The OpParamPtr must be of type struct XIsf_BufferToFlashWriteParam. OpParamPtr->BufferNum specifies the internal SRAM Buffer of the Serial Flash. The valid values are XISF_PAGE_BUFFER1 or XISF_PAGE_BUFFER2. XISF_PAGE_BUFFER2 is not valid in case of AT45DB011D Flash as it contains a single buffer. OpParamPtr->Address is starting address in the Serial Flash memory from where the data is to be written. These operations are only supported for Atmel Serial Flash.
  • Write Status Register (XISF_WRITE_STATUS_REG): The OpParamPtr must be of type of 8 bit unsigned integer variable. This is the value to be written to the Status Register. This operation is only supported for Intel, STM Winbond and Spansion Serial Flash.
  • Write Status Register2 (XISF_WRITE_STATUS_REG2): The OpParamPtr must be of type (u8 *) and should point to two 8 bit unsigned integer values. This is the value to be written to the 16 bit Status Register. This operation is only supported in Winbond (W25Q) Serial Flash.
  • One Time Programmable Area Write(XISF_OTP_WRITE): The OpParamPtr must be of type struct XIsf_WriteParam. OpParamPtr->Address is the address in the SRAM Buffer of the Serial Flash to which the data is to be written. OpParamPtr->WritePtr is a pointer to the data to be written to the Serial Flash. OpParamPtr->NumBytes should be set to 1 when performing OTPWrite operation. This operation is only supported for Intel Serial Flash.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if it fails.
Note
  • Application must fill the structure elements of the third argument and pass its pointer by type casting it with void pointer.
  • For Intel, STM, Winbond and Spansion Serial Flash, the user application must call the XIsf_WriteEnable() API by passing XISF_WRITE_ENABLE as an argument, before calling the XIsf_Write() API.

(((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.

Parameters
InstancePtrPointer to the XIsf instance.
WriteEnableSpecifies whether to Enable (XISF_CMD_ENABLE_WRITE) or Disable (XISF_CMD_DISABLE_WRITE) the writes to the Serial Flash.
Returns
  • XST_SUCCESS if successful.
  • XST_FAILURE if it fails.
Note
This API works only for Intel, STM, Winbond and Spansion Serial Flash. If this API is called for Atmel Flash, XST_FAILURE is returned.

((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.