Sorry, you need to enable JavaScript to visit this website.

SPI gets stuck in XSpiPs_PolledTransfer function

Zedboard forums is currently read-only while it under goes maintenance.

Unsolved
2 posts / 0 new
nowksru
Junior(0)
SPI gets stuck in XSpiPs_PolledTransfer function

Hello,
I am trying to work with the SPI controller from the PS side of the MicroZed to communicate with a ADC via the FMC Carrier Card. It works very inconsistent and most of the times the code gets stuck in a loop in the XSpiPs_PolledTransfer function (the picture shows the 5 steps of the assembler code (?) that runs in a loop):
 
00100d94: ldr r3, [r2]
00100d98: tst r3, #2
00100d9c: bne +148 ; addr=0x00100e38: XSpiPs_PolledTransfer + 0x000001cc
00100da0: tst r3, #4
00100da4: beq -24 ; addr=0x00100d94: XSpiPs_PolledTransfer + 0x00000128
 
The SPI Transfer is working as expected, that's why I am wondering why it gets stuck.
Most of the times the code stops working after the first transfer, sometimes it does up to four transfers.
I already tied SSIN High (with a constant in the block design inside Vivado) as it is recommended in forums and even Vivado recommends it.
I am working with SDK/Vivado 2017.4
Hope someone has an idea how this can be possible.
-Urs

fletch
Moderator(23)
Although not an ADC, the

Although not an ADC, the "Tutorial 06 PS SPI PMOD" might be helpful to see an example of using the SPI driver. You can find it on this page: http://zedboard.org/support/design/1519/10 

Bryan