cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
exds75
Explorer
Explorer
2,150 Views
Registered: ‎05-01-2017

how to SDK spi external loopback test

Jump to solution

Hi Xilinx,

 

             Vivado SDK 2015.4, zedboard, SPI1, PMOD JE

 

Struggle with SDK spi loopback test on zedboard by directly connecting MISO and SOMI pins.

 

I modified xspi_polled_example.c from /opt/Xilinx/SDK/2015.4/data/embeddedsw/XilinxProcessorIPLib/drivers/spi_v4_1/examples

 

1    ConfigPtr = XSpi_LookupConfig(SpiDeviceId);

2    XSpi_CfgInitialize(SpiInstancePtr, ConfigPtr, ConfigPtr->BaseAddress);

3    XSpi_SetOptions(SpiInstancePtr, (XSP_MASTER_OPTION | XSP_CLK_ACTIVE_LOW_OPTION |

                                                        XSP_CLK_PHASE_1_OPTION) | XSP_MANUAL_SSELECT_OPTION);

4    XSpi_Start(SpiInstancePtr);  

5    XSpi_IntrGlobalDisable(SpiInstancePtr);

6    XSpi_Transfer(SpiInstancePtr, WriteBuffer, ReadBuffer, 4);

 

      XSpi_Transfer simply flies away, and c program hangs.

 

My questions:

 

1. I measured signal SS (pin 1) always high. Loopback test doesn't have a slave device. Do I need to drive down SS pin, and How?

2. Is it still necessary for interrupt handling, since this is just a loopback test?

3. Please also advise on XSpi_SetOptions of an external loopback.

 

Thanks in advance.

 

Mike

0 Kudos
Reply
1 Solution

Accepted Solutions
1 Reply