XFlash_Initialize - 2021.1 English

Xilinx Standalone Library Documentation OS and Libraries Document Collection (UG643)

Document ID
Release Date
2021.1 English

This function initializes a specific XFlash instance.

The initialization entails:

  • Check the Device family type.
  • Issuing the CFI query command.
  • Get and translate relevant CFI query information.
  • Set default options for the instance.
  • Setup the VTable.
  • Call the family initialize function of the instance.

Initialize the Xilinx Platform Flash XL to Async mode if the user selects to use the Platform Flash XL in the MLD. The Platform Flash XL is an Intel CFI complaint device.

  • XFLASH_PART_NOT_SUPPORTED if the command set algorithm or Layout is not supported by any flash family compiled into the system.
  • XFLASH_CFI_QUERY_ERROR if the device would not enter CFI query mode. Either the device(s) do not support CFI, the wrong BaseAddress param was used, an unsupported part layout exists, or a hardware problem exists with the part.
Note: BusWidth is not the width of an individual part. Its the total operating width. For example, if there are two 16-bit parts, with one tied to data lines D0-D15 and other tied to D15-D31, BusWidth would be (32 / 8) = 4. If a single 16-bit flash is in 8-bit mode, then BusWidth should be (8 / 8) = 1.


int XFlash_Initialize(XFlash *InstancePtr, u32 BaseAddress, u8 BusWidth, int IsPlatformFlash);


The following table lists the XFlash_Initialize function arguments.

Table 1. XFlash_Initialize Arguments
Type Name Description
XFlash * InstancePtr Pointer to the XFlash instance.
u32 BaseAddress Base address of the flash memory.
u8 BusWidth Total width of the flash memory, in bytes
int IsPlatformFlash Used to specify if the flash is a platform flash.


  • XST_SUCCESS if successful.