XIsf_Erase - 2020.2 English

OS and Libraries Document Collection (UG643)

Document ID
UG643
Release Date
2020-11-24
Version
2020.2 English

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

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.

Prototype

int XIsf_Erase(XIsf *InstancePtr, XIsf_EraseOperation Operation, u32 Address);

Parameters

The following table lists the XIsf_Erase function arguments.

Table 1. XIsf_Erase Arguments
Type Name Description
XIsf * InstancePtr Pointer to the XIsf instance.
XIsf_EraseOperation Operation Type 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
u32 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.

Returns

XST_SUCCESS if successful else XST_FAILURE.