This API is used for performing Sector Protect related operations.
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 theXIsf_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.
Prototype
int XIsf_SectorProtect(XIsf *InstancePtr, XIsf_SpOperation Operation, u8 *BufferPtr);
Parameters
The following table lists the XIsf_SectorProtect
function arguments.
Type | Name | Description |
---|---|---|
XIsf * | InstancePtr | Pointer to the XIsf instance. |
XIsf_SpOperation | Operation |
Type of Sector Protect operation to be performed on the Serial Flash. The different operations are
|
u8 * | BufferPtr | 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.
- XST_FAILURE if it fails.