XFlash_Read - 2022.2 English

Xilinx Standalone Library Documentation: BSP and Libraries Document Collection (UG643)

Document ID
UG643
Release Date
2022-10-19
Version
2022.2 English

This function reads the data from the Flash device and copies it into the specified user buffer.

The source and destination addresses can be on any alignment supported by the processor.

The device is polled until an error or the operation completes successfully.

Note: This function allows the transfer of data past the end of the device's address space. If this occurs, then results are undefined.

Prototype

int XFlash_Read(XFlash *InstancePtr, u32 Offset, u32 Bytes, void *DestPtr);

Parameters

The following table lists the XFlash_Read function arguments.

Table 1. XFlash_Read Arguments
Type Name Description
XFlash * InstancePtr Pointer to the XFlash instance.
u32 Offset Offset into the device(s) address space from which to read.
u32 Bytes Number of bytes to copy.
void * DestPtr Destination address to copy data to.

Returns

  • XST_SUCCESS if successful.
  • XFLASH_ADDRESS_ERROR if the source address does not start within the addressable areas of the device(s).