This page gives an overview of the bare-metal driver support for the PS NAND Controller.
The source code for the driver is included with the Vitis Unified Software Platform installation, as well as being available in the Xilinx Github repository.
Driver Name | Path in Vitis | Path in Github |
---|---|---|
nandpsu | <Vitis Install Directory>/data/embedded/XilinxProcessorIPLib/drivers/nandpsu | https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/nandpsu |
Note: To view the sources for a particular release, use the rel-version tag in github. For example, for the 2020.1 release, the proper version of the code is: https://github.com/Xilinx/embeddedsw/tree/xilinx-v2020.1/XilinxProcessorIPLib/drivers/nandpsu |
The driver source code is organized into different folders. The table below shows the nandpsu driver source organization.
Directory | Description |
---|---|
doc | Provides the API and data structure details |
data | Driver .tcl,.mdd file and .yaml files |
examples | Example applications that show how to use the driver features |
src | Driver source files, make and cmake files |
Note: AMD Xilinx embeddedsw build flow is changed from 2023.2 release to adapt to the new system device tree based flow. For further information, refer to the wiki page Porting embeddedsw components to system device tree (SDT) based flow - Xilinx Wiki - Confluence (atlassian.net).
The .yaml(in data folder) and CMakeLists.txt(in src folder) files are needed for the System Device Tree based flow. The Driver .tcl and .mdd files are for the older build flow which will be deprecated in the future.
For a full list of features supported by this IP, please refer Chapter 25: NAND Memory Controller in ZynqMP TRM.
Refer to the driver examples directory for various example applications that exercise the different features of the driver. Each application is linked in the table below. The following sections describe the usage and expected output of the various applications. These example applications can be imported into the Vitis IDE from the Board Support Package settings tab
Examples Path:
Test Name | Example Souce | Description |
---|---|---|
NAND Example | xnandpsu_example.c | This examples does basic read and write test from the NAND flash device |
This examples does basic read and write test from the NAND flash device.
Nand Flash Read Write Example Test Manufacturer: MICRON MT29F32G08ABCDBJ4 , Device Model: MT29F32G08ABCDBJ4 , Jedec ID: 0x2C Bytes Per Page: 0x4000 Spare Bytes Per Page: 0x4C0 Pages Per Block: 0x100 Blocks Per LUN: 0x418 Number of LUNs: 0x1 Number of bits per cell: 0x1 Number of ECC bits: 0xFF Block Size: 0x400000 Number of Target Blocks: 0x418 Number of Target Pages: 0x41800 ECC: addr 0x4220 size 0x2A0 numbits 24 codesz 10 XNandPsu_ReadBbt: Bad block table not found Successfully ran Nand Flash Read Write Example Test |
---|
NA
Timing Mode | Write(mbps) | Read(mbps) |
---|---|---|
SDR mode 0 | 6.4 | 7.7 |
SDR mode 1 | 11.2 | 15.1 |
SDR mode 2 | 13.0 | 18.7 |
SDR mode 3 | 15.1 | 24.4 |
SDR mode 4 | 15.6 | 24.5 |
SDR mode 5 | 15.7 | 24.5 |
NVDDR mode 0 | 31.0 | 107.7 |
NVDDR mode 1 | 31.0 | 106.2 |
NVDDR mode 2 | 31.0 | 106.3 |
NVDDR mode 3 | 31.0 | 107 |
NVDDR mode 4 | 31.0 | 106.3 |
NVDDR mode 5 | 31.0 | 106.3 |
https://github.com/Xilinx/embeddedsw/blob/xlnx_rel_v2023.2/doc/ChangeLog#L712
None
https://github.com/Xilinx/embeddedsw/blob/xilinx_v2022.1/doc/ChangeLog#L55
https://github.com/Xilinx/embeddedsw/blob/xilinx_v2021.2/doc/ChangeLog#L217
https://github.com/Xilinx/embeddedsw/blob/xilinx_v2021.1/doc/ChangeLog#L455
https://github.com/Xilinx/embeddedsw/blob/xilinx-v2020.2/doc/ChangeLog#L637
https://github.com/Xilinx/embeddedsw/blob/xilinx-v2020.1/doc/ChangeLog#L6
https://github.com/Xilinx/embeddedsw/blob/xilinx-v2019.2/doc/ChangeLog#L801
https://github.com/Xilinx/embeddedsw/blob/xilinx-v2019.1/doc/ChangeLog#L562