![]() |
xilflash
Vitis Drivers API Documentation
|
This file contains a design example using the Generic Flash Library.
This example tests the Lock and UnLock features of the Flash Device.
A block is Locked and an attempt is made to erase a Page in that block. This should return an error. The block is then unlocked and an attempt is made to erase a page in that block which should succeed. A page of data is written, read back and compared with the data written for correctness.
MODIFICATION HISTORY:
Ver Who Date Changes
1.01a mta 10/09/07 First release 1.01a sdm 02/24/09 Updated the notes with information about using the example with AMD CFI compliant Flash devices 2.00a ktn 12/04/09 Updated to use the HAL processor APIs/macros 3.00a sdm 03/03/11 Updated to pass BaseAddress and Flash Width to _Initialize API, as required by the new version of the library 4.2 nsk 01/29/16 Added Support to change Flash to Async Mode, if it was set to sync mode. Modified FLASH_BASE_ADDRESS to canonical name. 4.7 akm 07/23/19 Initialized Status variable to XST_FAILURE. 4.10 akm 07/14/23 Added support for system device-tree flow. *
Functions | |
| int | FlashProtectionExample (void) |
| This function verifies the locking and unlocking features of the Flash device. More... | |
| int | main (void) |
| Main function to execute the Flash protection example. More... | |
| int FlashProtectionExample | ( | void | ) |
This function verifies the locking and unlocking features of the Flash device.
| None |
References XFlash_Erase(), XFlash_Initialize(), XFlash_Lock(), XFlash_Read(), XFlash_Reset(), XFlash_Unlock(), and XFlash_Write().
Referenced by main().
| int main | ( | void | ) |
Main function to execute the Flash protection example.
| None |
References FlashProtectionExample().