xilflash
Vitis Drivers API Documentation
xilflash_platform_flash_example.c File Reference

Overview

This file contains a design example using the Flash Library with the Xilinx Platform Flash XL device.

This example tests Unlock, Erase, Read and Write features. The Page is unlocked, erased and data is written to the page. The data is read back and compared with the data written for correctness. This example also shows usage of XFlash_DeviceControl to set the Platform Flash XL device in the Async/Sync Mode.

Note
None
  MODIFICATION HISTORY:
  Ver   Who  Date     Changes


1.00a ksu 06/16/09 First release 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.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 PlatformFlashReadWriteExample (void)
 This function writes, reads, and verifies the data to the Flash device. More...
 
int main (void)
 Main function to execute the Platform Flash Read/Write example. More...
 

Function Documentation

int main ( void  )

Main function to execute the Platform Flash Read/Write example.

Parameters
None
Returns
XST_SUCCESS if successful else XST_FAILURE.
Note
None.

References PlatformFlashReadWriteExample().

int PlatformFlashReadWriteExample ( void  )

This function writes, reads, and verifies the data to the Flash device.

Parameters
None
Returns
XST_SUCCESS if successful else XST_FAILURE.
Note
None.

References XFlash_DeviceControl(), XFlash_Erase(), XFlash_Initialize(), XFlash_Read(), XFlash_Reset(), XFlash_Unlock(), and XFlash_Write().

Referenced by main().