Spips standalone driver
This page gives an overview of the bare-metal driver support for the PS SPI.
Table of Contents
Introduction
Driver Sources
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 |
---|---|---|
spips | <Vitis Install Directory>/data/embedded/XilinxProcessorIPLib/drivers/spips | https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/spips |
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/spips
The driver source code is organized into different folders. The table below shows the spips driver source organization.
Directory | Description |
---|---|
doc | Provides the API and data structure details |
data | Driver .tcl , .mdd and .yaml files |
examples | Example applications that show how to use the driver features |
src | Driver source files, make and cmakelists file |
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.
Driver Implementation
For a full list of features supported by this IP, please refer Chapter 67: SPI Controller in Versal TRM.
Features
- Master mode
- Slave mode
- All SPI flash instructions
- Support for 3 slaves - can be extended using a 3 to 8 decoder
- Driver uses manual chip select and auto start options
- Programmable clock frequency, polarity and phase
- Interrupt support
Known Issues and Limitations
Supported Flash vendors
Example Applications
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
Links to Examples
Examples Path:
https://github.com/Xilinx/embeddedsw/tree/xilinx-v2020.1/XilinxProcessorIPLib/drivers/spips/examples
Test Name | Example Source | Description |
---|---|---|
SPIPS Interrupt Mode Example | xspips_flash_intr_example.c | This examples does basic read and write test from the SPI-NOR flash device in Interrupt mode |
SPIPS PolledMode Example | xspips_flash_polled_example.c | This examples does basic read and write test from the SPI-NOR flash device in Polled mode |
SPIPS Self Test Example | xspips_selftest_example.c | This examples does basic hardware connection check |
SPIPS Interrupt Mode EEPROM Example | xspips_eeprom_intr_example.c | This examples does basic read and write test from the SPI EEPROM device in Interrupt mode |
SPIPS Polled Mode EEPROM Example | xspips_eeprom_polled_example.c | This examples does basic read and write test from the SPI EEPROM device in Polled mode |
SPIPS Slave Mode Polled Example | xspips_slave_polled_example.c | This example does basic read write as Slave device in Polled Mode |
SPIPS TPM Polled Example | xspips_tpm_polled_example.c | This example sends TPM commands to device based on user inputs and displays the response |
Example Application Usage
SPIPS Interrupt Mode Example
This examples does basic read and write test from the flash device in Interrupt mode.
SPI FLASH Interrupt Example Test ID : BF ID : 26 ID : 51 ID : BF Successfully ran SPI FLASH Interrupt Example Test |
---|
SPIPS Polled Mode Example
This examples does basic read and write test from the flash device in Polled mode.
SPI SerialFlash Polled Example Test ID : BF ID : 26 ID : 51 ID : BF Successfully ran SPI SerialFlash Polled Example Test |
---|
SPIPS Self Test Example
This examples does basic hardware connection check.
SPI Selftest Example Successfully ran SPI Selftest Example |
---|
Example Design Architecture
NA
Performance
Change Log
2024.1
None
2023.2
None
2023.1
None
2022.2
2022.1
None
2021.2
None
2021.1
https://github.com/Xilinx/embeddedsw/blob/xilinx_v2021.1/doc/ChangeLog#L473
2020.2
https://github.com/Xilinx/embeddedsw/blob/xilinx-v2020.2/doc/ChangeLog#L1565
2020.1
https://github.com/Xilinx/embeddedsw/blob/xilinx-v2020.1/doc/ChangeLog#L533
2019.2
https://github.com/Xilinx/embeddedsw/blob/xilinx-v2019.2/doc/ChangeLog#L82
2019.1
https://github.com/Xilinx/embeddedsw/blob/xilinx-v2019.1/doc/ChangeLog#L159
© Copyright 2019 - 2022 Xilinx Inc. Privacy Policy