xilisf_spr.c File Reference

#include "include/xilisf.h"

Functions

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

Detailed Description

This file contains the library functions to operate on Sector Protection feature of the Serial Flash. Refer xilisf.h for a detailed description.

 MODIFICATION HISTORY:

 Ver   Who      Date     Changes
 ----- -------  -------- -----------------------------------------------
 1.00a ksu/sdm  03/03/08 First release
 2.01a sdm      01/04/10 Added Support for Winbond W25QXX/W25XX devices
 2.04a sdm      08/17/10 Updated to support Numonyx (N25QXX) and Spansion
			  flash memories

 

Function Documentation

int XIsf_GetStatus XIsf InstancePtr,
u8 *  ReadPtr
 

This API reads the Serial Flash Status Register.

Parameters:
InstancePtr is a pointer to the XIsf instance.
ReadPtr is a pointer to the memory where the Status Register content is copied.
Returns:
XST_SUCCESS if successful else XST_FAILURE.
Note:
The contents of the Status Register is stored at the second byte pointed by the ReadPtr.

int XIsf_SectorProtect XIsf InstancePtr,
XIsf_SpOperation  Operation,
u8 *  BufferPtr
 

This API is used for performing Sector Protect related operations.

Parameters:
InstancePtr is a pointer to the XIsf instance.
Operation is the type 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
BufferPtr is a pointer 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 else XST_FAILURE.
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.


Generated on Thu Feb 13 14:38:18 2014 for 2014.1_doc by  doxygen 1.4.5