UPGRADE YOUR BROWSER
We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!
07-23-2018 06:00 AM
I have a ZCU102 Board and want to use a SPI on a PMOD-Connector. For this i took the QuadSPI.
When running with the loopback flag everything is running fine, but when i remove the loopback and use a
connection from MOSI to MISO i always receive 0. What could be the problem ?
First picture D0=MOSI,D1=MISO,D2=CLK,D3=SEL.
This is the Constraint File for PMOD0 :
set_property PACKAGE_PIN A20 [get_ports spi_mosi]
set_property PACKAGE_PIN B20 [get_ports spi_miso]
set_property PACKAGE_PIN A22 [get_ports spi_sck]
set_property PACKAGE_PIN A21 [get_ports spi_sel]
set_property IOSTANDARD LVCMOS33 [get_ports spi_mosi]
set_property IOSTANDARD LVCMOS33 [get_ports spi_miso]
set_property IOSTANDARD LVCMOS33 [get_ports spi_sck]
set_property IOSTANDARD LVCMOS33 [get_ports spi_sel]
07-31-2018 04:34 AM
Hi bader@gctnet.de,
If you remove loopback then how are you configuring the mode of transfers in SPI?
Is it in normal mode?
Regards
Praveen
07-31-2018 07:28 AM
I only set the MasterOption:
The SPI IP is in Standard-Mode ( not Dual or Quad ), XIP and Performance mode is disabled.
And this is the setting in the SDK:
Status = XSpi_SetOptions(&Spi_PL, XSP_MASTER_OPTION );
07-31-2018 08:46 AM
Here is a part of my serial output:
TX: 0x01 0x55 0x02 0xAA
xRX: 0x00 0x00 0x00 0x00
[0x60]=0x0106 [0x64]=0x0025 [0x70]=0x0001 [0x74]=0x0000 [0x78]=0x0000 [0x1C]=0x80000000 [0x20]=0x0000
[0x28]=0x002B.
[Register] = Value
The "x" before RX indicates an Interrupt. For starting I used the example code from "xspi_intr_example.c"
08-06-2018 10:49 PM
08-06-2018 11:36 PM
Did you enable the XILISF library on the BSP?
No i didn't enable this Library before because i hadn't found any reference to it. But i have tested it now with enabled xilifs
and it is the same -> no Input, always 0.
When you ran the example application, did it get executed successfully? If not, at what stage does it fail?
This example is not a real example, because it only uses loopback ( as you can find in the posts above ).
And this works. Please read the posts above for all informations i already posted. And as you can see, everything is running
even the interrupt is working, only the input doesn't work !
08-13-2018 04:52 AM
08-13-2018 05:17 AM
Can you please share the application that you run?
I cannot share the application, because for me i throw this IP to waste and programmed one for myself in the meantime !
But i think it is a bug, so you should look for it.
I will target that to one of our evaluation boards and see where it is going wrong.
Simply connect the QuadSPI as a single SPI in standard mode. Then connect MOSI to MISO. No Flash to read or write. I already
described this in the first post.
It's not a loopback. Can you please point to the reference where it runs a loopback?
As explained above i used the example : xspi_intr_example.c ( see below)
[...]
// Run loopback test only in case of standard SPI mode.
if (SpiInstancePtr->SpiMode != XSP_STANDARD_MODE) {
return XST_SUCCESS;
}
// Connect the Spi device to the interrupt subsystem such that
// interrupts can occur. This function is application specific.
Status = SpiSetupIntrSystem(IntcInstancePtr,SpiInstancePtr,SpiIntrId);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
/*
* Setup the handler for the SPI that will be called from the interrupt
* context when an SPI status occurs, specify a pointer to the SPI
* driver instance as the callback reference so the handler is able to
* access the instance data.
*/
XSpi_SetStatusHandler(SpiInstancePtr, SpiInstancePtr,
(XSpi_StatusHandler) SpiIntrHandler);
/*
* Set the Spi device as a master and in loopback mode.
*/
Status = XSpi_SetOptions(SpiInstancePtr, XSP_MASTER_OPTION | XSP_LOOPBACK_OPTION);
if (Status != XST_SUCCESS) {
return XST_FAILURE;
}
[..]
But as i explained above, it doesn't work without loopback, and as i further explained above, everything works i even get an interrupt, but the received data is alway 0. . I looks like the input pin i not lead back to the IP.
08-20-2018 04:31 AM
08-20-2018 09:26 AM
In the meantimne i have built a testapplication too. And it is the same. How can i simply post a complete
project with SDK-Code and so on ?
08-20-2018 10:03 PM
08-28-2018 04:51 AM
09-25-2018 01:59 AM
Do you have an idea whats happening ?
I still cannot use this IP !