XFlash_Lock - 2021.1 English

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

Document ID
UG643
Release Date
2021-06-16
Version
2021.1 English

This function Locks the blocks in the specified range of the flash device(s).

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

  • XFLASH_ADDRESS_ERROR if the destination address range is not completely within the addressable areas of the device(s).
Note: Due to flash memory design, the range actually locked may be larger than what was specified by the Offset & Bytes parameters. This will occur if the parameters do not align to block boundaries.

Prototype

int XFlash_Lock(XFlash *InstancePtr, u32 Offset, u32 Bytes);

Parameters

The following table lists the XFlash_Lock function arguments.

Table 1. XFlash_Lock Arguments
Type Name Description
XFlash * InstancePtr Pointer to the XFlash instance.
u32 Offset Offset into the device(s) address space from which to begin block locking. The first three bytes of every block is reserved for special purpose. The offset should be at least three bytes from start of the block.
u32 Bytes Number of bytes to Lock in the Block starting from Offset.

Returns

  • XST_SUCCESS if successful.