![]() |
xilisf_v5_14
Xilinx SDK Drivers API Documentation
|
This file contains a design example using the In-system and Serial Flash Library (XilIsf).
This example shows all the features related to Sector Protection.
This example
The example works for AT45DB011D/AT45DB021D/AT45DB041D/AT45DB081D Serial Flash devices. The bytes per page (ISF_PAGE_SIZE) in these devices is 264 for Default addressing mode and 256 in Power-of-2 addressing mode.
For AT45DB161D/AT45DB321D devices the Bytes Per Page (ISF_PAGE_SIZE) is 528 for Default addressing mode and 512 in Power-Of-2 addressing mode.
For AT45DB642D device the Bytes Per Page (ISF_PAGE_SIZE) is 1056 for Default addressing mode and 1024 in Power-Of-2 addressing mode.
The ISF_PAGE_SIZE should be defined by the user according to the Device used.
For further details of each device refer to the Spartan-3AN Serial Flash User Guide and data sheets of Atmel AT45XXXD .
This example has been tested with the In-System Flash Memory available on the Spartan-3AN on a Xilinx Spartan-3AN Starter Kit board.
None.
MODIFICATION HISTORY:
Ver Who Date Changes
1.00a mta/ksu 03/20/08 First release 1.00a ktn 09/08/09 Updated this example such that every SPR write should be preceded by an erase as per the atmel datasheet. 2.00a ktn 11/22/09 Updated to use HAL processor APIs. 5.0 sb 08/05/14 Registering to Xilisf Interrupt handler instead of driver handler. 5.14 akm 08/01/19 Initialized Status variable to XST_FAILURE. *
Functions | |
void | SpiHandler (void *CallBackRef, u32 StatusEvent, u16 ByteCount) |
This function is the handler which performs processing for the SPI driver. More... | |
int | main (void) |
Main function to call the Atmel Serial Flash SPR example. More... | |
int main | ( | void | ) |
Main function to call the Atmel Serial Flash SPR example.
void SpiHandler | ( | void * | CallBackRef, |
u32 | StatusEvent, | ||
u16 | ByteCount | ||
) |
This function is the handler which performs processing for the SPI driver.
It is called from an interrupt context such that the amount of processing performed should be minimized. It is called when a transfer of SPI data completes or an error occurs.
This handler provides an example of how to handle SPI interrupts and is application specific.
CallBackRef | is the upper layer callback reference passed back when the callback function is invoked. |
StatusEvent | is the event that just occurred. |
ByteCount | is the number of bytes transferred up until the event occurred. |