WARP Project Forums - Wireless Open-Access Research Platform

You are not logged in.

#1 2014-Mar-04 01:11:32

amita
Member
Registered: 2013-Jul-16
Posts: 18

SPI loopback test

We have implemented SPI on warp v3 using FMC-XM-105-G debug card. For testing we have to send a loopback within the same board. Our target code is OFDM_Reference_Design where we have made necessary changes in the warpmac.c and csmamac.c files. Can you provide us with some idea how can we test pur communication within the same board?

Offline

 

#2 2014-Mar-04 08:09:05

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: SPI loopback test

Can you provide us with some idea how can we test pur communication within the same board?

No, not with the very limited information you've provided.

How is your SPI controller implemented? Did you modify the FPGA design to use a hardware controller? Or did you just tie the SPI signals to a GPIO controller for software control?

Offline

 

#3 2014-Mar-05 05:35:16

amita
Member
Registered: 2013-Jul-16
Posts: 18

Re: SPI loopback test

We have added the Xilinx XPS_SPI IP to the existing OFDM_Reference _Design and connected the SPI signals to the header of FMC-XM105 debug card. we have made necessary changes within the software itself and compiled successfully with no errors. now we want to test our design. How can we do it by sending the command within the same board as right now we don't have the facility to use a different warp board.

Offline

 

#4 2014-Mar-05 08:47:27

welsh
Administrator
From: Mango Communications
Registered: 2013-May-15
Posts: 612

Re: SPI loopback test

I'm not sure what you mean by "How can we do it by sending the command within the same board".

However, in order to test new hardware the general procedure should be:

1) Run a couple of existing examples (for example, the Wireless/Wired Bridge) in order to make sure that you did not break any of the existing design.

2) In a separate SDK software project, modify and run one of the provided Xilinx SPI examples.  As part of the Xilinx installation, there should be a number of example C files for each standard Xilinx peripherals.  Looking at our Xilinx 14.4 installation, the SPI examples for the spi_v3_04_a peripheral are in:  C:\Xilinx\14.4\ISE_DS\EDK\sw\XilinxProcessorIPLib\drivers\spi_v3_04_a\examples.  It looks like there is a "self test" as part of the examples which would probably be a good place to start.  You will need to read and understand the necessary setup and code in order to run the example. 

3) Once you have verified that you can access the SPI peripheral from SW, then you need to make sure that the expected pins on the FMC debug board toggle.  Using an oscilloscope, you should verify that you see the expected pins toggle to ensure that you have all of the IO mapping correct in your HW project. 

Once you feel confident that both the original HW and the new peripheral are working, then you can start using the SPI peripheral in your OFDM project

Offline

 

#5 2014-Mar-05 08:59:34

murphpo
Administrator
From: Mango Communications
Registered: 2006-Jul-03
Posts: 5159

Re: SPI loopback test

Also, SPI is intended for inter-chip communication. You need to provide an SPI slave for the SPI master to talk to. This could be a different board, connected by 4 wires (clk, cs_n, sdi, sdo), or another instance of the axi_spi core in the same FPGA.

Offline

 

Board footer