![]() |
spips
Vitis Drivers API Documentation
|
Implements a design example using the SPI controller in slave mode.
The example performs transfers in polled mode and has been tested with Aardvark Analyzer as Master. The example echoes data which it receives from the master. The slave controller expects MAX_DATA bytes of data from the master to transmit onto the SPI bus which the slave receives into its Rx buffer. It polls until the Rx FIFO is filled with the Threshold limit of data which is set to MAX_DATA. On sending data, the master receives dummy bytes in response. Master has to send MAX_DATA dummy bytes to read back the echoed data.
MODIFICATION HISTORY:
Ver Who Date Changes
2.0 sb 08/22/14 First release ms 04/05/17 Modified Comment lines in functions to recognize it as documentation block for doxygen generation. 3.9 sb 07/05/23 Added support for system device-tree flow. 3.13 sb 09/09/25 Fix GCC warnings. 3.14 vlt 12/18/25 Update Doxygen comments to include SDT flow details. 3.15 vn 08/26/26 Fix Doxygen warnings. 3.15 tb 09/30/26 Align Doxygen comments with AMD documentation standards
Macros | |
| #define | MAX_DATA 100 |
| Max data size in bytes. More... | |
| #define | UNIQUE_VALUE 0xAA |
| Unique test data value. More... | |
Functions | |
| int | SpiPsSlavePolledExample (UINTPTR BaseAddress) |
| Illustrates how to use the XSpiPs device driver in Slave mode. More... | |
| int | main (void) |
| Calls the SPI Slave Example. More... | |
Variables | |
| u8 | ReadBuffer [MAX_DATA] |
| Data received from the master. More... | |
| u8 | WriteBuffer [MAX_DATA] |
| Data to send to the master. More... | |