![]() |
nandpsu
Xilinx SDK Drivers API Documentation
|
This file contains a design example using the NAND driver (XNandPsu).
This example tests the erase, read and write features of the controller. The flash is erased and written. The data is read back and compared with the data written for correctness.
None.
MODIFICATION HISTORY:
Ver Who Date Changes
1.0 nm 05/06/2014 First release. ms 04/10/17 Modified Comment lines to follow doxygen rules. 1.4 nsk 10/04/2018 Added support for ICCARM Compiler.
Functions | |
s32 | NandReadWriteExample (u16 NandDeviceId) |
This function runs a test on the NAND flash device using the basic driver functions in polled mode. More... | |
u8 ReadBuffer[TEST_BUF_SIZE] | __attribute__ ((aligned(64))) |
Block sized Read buffer. More... | |
s32 | main (void) |
Main function to execute the Nand Flash read write example. More... | |
u8 ReadBuffer [TEST_BUF_SIZE] __attribute__ | ( | (aligned(64)) | ) |
Block sized Read buffer.
Block sized write buffer.
s32 main | ( | void | ) |
Main function to execute the Nand Flash read write example.
None. |
References NandReadWriteExample().
s32 NandReadWriteExample | ( | u16 | NandDeviceId | ) |
This function runs a test on the NAND flash device using the basic driver functions in polled mode.
The function does the following tasks:
NandDeviceId | is is the XPAR_<NAND_instance>_DEVICE_ID value from xparameters.h. |
References XNandPsu_Config::BaseAddress, XNandPsu_Geometry::BytesPerPage, XNandPsu::Geometry, XNandPsu_CfgInitialize(), XNandPsu_EnableDmaMode(), XNandPsu_Erase(), XNandPsu_LookupConfig(), XNandPsu_Read(), and XNandPsu_Write().
Referenced by main().