Post Go back to editing

persistent SPI Read Failure (Error -5) & MISO Level Shifter Contention on ZC702 + CN0566 / ADAR1000

Thread Summary

The user encountered issues migrating control of a CN0566 (ADAR1000) beamformer from a Raspberry Pi to a ZC702 (Zynq-7000) over PMOD headers. Despite confirming SPI connectivity and reducing the clock speed to 100 kHz, the MISO line remained at a high level (~3.3V) on the ZC702 side. The problem was resolved by using the FMC connector instead of PMOD, likely due to issues with the bidirectional level shifters in the PMOD headers.
AI Generated Content
Category: Hardware
Product Number: ADAR1000

Hi all,

I'm migrating control of a CN0566 (Phaser) beamformer board from its reference Raspberry Pi host to a ZC702 (Zynq-7000), connecting over the PMOD J62/J63 headers with a ported device tree (adar1000/adf4159 nodes, xlnx,zynq-spi-r1p6 controller). The same CN0566 unit works perfectly on the Pi — ADAR1000 scratchpad read/write succeeds, and both beamformers and the ADF4159 probe correctly. On ZC702, the identical scratchpad test fails consistently — reads simply don't return the expected value.

I'm also not using the ADALM-Pluto/AD9363 SDR that normally pairs with CN0566+Raspberry Pi. Instead, I'm using FMCOMMS4 (AD9361) directly on ZC702's FMC connector, alongside CN0566 on the PMOD headers.

Hardware & System Setup

  • Target board: ADI CN0566 (ADAR1000)
  • FPGA board: Xilinx ZC702 (Zynq-7000), PL PMOD Headers (J62 & J63)
  • Base FPGA project: AMD/Xilinx FMCOMMS2-ZC702 reference design (GitHub), extended with CN0566 SPI/PMOD connectivity
  • Interface voltage: 2.5V VADJ (FPGA side) / 3.3V VCC3V3 (PMOD side)
  • Software environment: Linux, in-kernel adi,adar1000 + adi,adf4159 IIO drivers, libiio

What I've already ruled out, with evidence:

  • CN0566's onboard SN74AVC4T245 level shifter / DIR-pin wiring — confirmed via schematic that 1DIR/2DIR are fixed correctly for their signal directions; also ruled out structurally since the same board works fine on the Pi, so any CN0566-side fault would affect both hosts identically.
  • Vivado block-design connectivity — confirmed via Tcl (get_bd_pins/get_bd_ports) that spi1_sdi_i reaches a proper top-level port, matching spi0_sdi_i's pattern exactly.
  • Wrapper HDL — confirmed spi1_sdi_i is a clean, unbuffered top-level input with no stray logic or second driver.
  • Internal PL pull resistor — added PULLTYPE PULLDOWN on the MISO port in XDC; zero effect on a DC voltage measurement, ruling out the FPGA's own weak internal pull as the dominant factor.
  • SPI clock speed — discovered via the ZC702 user guide that PMOD signals route through an onboard TXS0108E auto-direction-sensing level shifter, documented by Xilinx as having multi-microsecond rise/fall times and a ~100 kHz practical ceiling, with FMC recommended instead for high-speed GPIO/SPI. Lowered spi-max-frequency to 100 kHz (confirmed via /proc/device-tree readback: 00 01 86 a0) — no change; the scratchpad test still fails.

The most concrete anomaly — DC voltage on MISO:

Static multimeter measurement, powered, idle bus, comparing both sides of CN0566's level shifter on both hosts:

3.3V (A) side 1.8V (B) side
Raspberry Pi (working) ~0.0006 V ~0.436 V
ZC702 (failing) ~3.335 V ~0.843 V

Isolation testing: disconnecting the wire at the CN0566 end drops that side to ~1.7V (consistent with the shifter's bus-hold floating state). Disconnecting at the ZC702 end and measuring the free wire end still reads ~3.3V, isolated from CN0566 entirely — confirming the high level originates on the ZC702 side of the connector, independent of CN0566 or the wiring between them.

Question for the community:

  1. Has anyone run CN0566 (or another ADAR1000-based SPI target device) successfully over ZC702's PMOD headers, given the TXS0108E's documented speed ceiling? Is FMC genuinely required for this, or has anyone gotten reliable SPI over PMOD at reduced clock rates?
  2. Any known cause for a PMOD signal configured purely as a PS7 SPI input (spi1_sdi_i, no output driver in the block design, no BD-level pull enabled) sitting at a hard ~3.3V DC level that persists even fully disconnected from the peripheral? Suspect either a populated pull-up on the ZC702 PMOD breakout itself, or a fault in the TXS0108E's auto-sensing behavior under a floating/undriven condition — interested in whether this is a known TXS0108E quirk specifically.

Thanks in advance.

  • Hi  , and apologies for the delay. The CN0566 is more of a reference design, this forum is mainly for RF / microwave individual devices.

    This might take a couple of steps to fully debug. Those auto-direction-sensing level shifters can be problematic, especially those with accelerators. They work fine when they're on the same board as the devices on either side and when traces are short, but as soon as cables are involved and sub-optimum grounding between devices get involved, all sorts of strange things can happen. I also see that the internal pullup resistance is 4k when driving high, which shouldn't be a problem for the CN0566's level shifters, but something to keep in mind. The shifters may not be the root of the problem, but wanted to bring it up first.

    I see you mention: 

    • Interface voltage: 2.5V VADJ (FPGA side) / 3.3V VCC3V3 (PMOD side)

    Does that mean that the ZC702 is providing the 3.3V to its own PMOD VCC? If so - great! Are you wiring that over to the RPi 3.3V supply on the phaser? Note R1 (DNI) and R2 (zero ohm) select the RPi's 3.3V for the VLOGIC supply. So with the RPi removed, you'll have to provide this externally, this is what powers the Pi side of the shifters.

    Do you have a complete wiring diagram showing all connections? SPI including all CS lines, grounds, and supplies? And a photograph is also often extremely helpful.

    -Mark

    Tagging @jon.kraft 

  • Hi , thanks for the detailed reply, and understood on the forum scope.

    On your questions:

    Supply: Yes, the ZC702 provides the 3.3V from its own PMOD VCC (J63 pins 11/12). I have wired it to the Phaser's RPi 3.3V supply pins (P2-17 and P2-1). The Pi is fully removed. [Confirm R1 is DNI and R2 is populated with 0 Ω on my board, so VLOGIC comes from the P2 3.3V rail to level shifters, and measure VLOGIC at the shifter supply pins to confirm it reads 3.3V.]

    Wiring (ZC702 PMOD to CN0566 P2):

    Signal ZC702 PMOD pin FPGA pin CN0566 P2
    SCLK J62-4 P17 23
    MOSI J62-3 P18 19
    MISO J62-2 W10 21
    CS0 J62-1 V7 24
    CS1 J63-1 E15 26
    CS2 J63-7 W5 13
    GND J62-5, J63-9, J63-10 – 25, 14, 39
    3.3V J63-11, J63-12 – 17, 1

    Here is the wiring diagram you asked for. It shows every connection between the ZC702 and the CN0566: the SPI bus (SCLK, MOSI, MISO) and all three chip selects (CS0, CS1, CS2), the three ground connections, and the two 3.3V feeds from the ZC702 PMOD to the Phaser's RPi 3.3V pins (P2-17 and P2-1), which feed VLOGIC. Nothing else is connected. The CN0566's other GPIO control lines are currently unwired.



    Thanks, 






  • Also, make sure you are implementing the procedure from the "SPI Considerations" and "SDO Readback Problem" chapters of the ADAR1000 datasheet:  https://www.analog.com/media/en/technical-documentation/data-sheets/ADAR1000.pdf

  • Hi  , Sorry for the spotty replies, there's several possible next steps but I do want to rule out signal integrity. Re: "reads simply don't return the expected value." - Is there any pattern to the incorrect data? That is, if you write 0b00010001, do you read back 0b00110011? A ringing SCK line can do stuff like that, double-clock bits either going in or coming out, or both.

    and I'm trying to interpret your table (formatting incorrect after pasting):

    3.3V (A) side 1.8V (B) side
    Raspberry Pi (working) ~0.0006 V ~0.436 V
    ZC702 (failing) ~3.335 V ~0.843 V

    If this is MISO, that does not look right on the 1.8V side, unless no device was selected (all CS lines high). Can you verify that one of the ADAR1000's CS is being driven low during this test? In this state, you'd expect the 1.8V MISO to be either very close to zero or very close to 1.8V. You could carefully de-select all devices and manually drive MISO via one of the surface mount test points. To be safe, I'd use a 1k series resistor, and either tie to GND or the 1.8V onboard supply (vs an external power supply.)

    Again, a photo is often quite helpful. How is the wiring done? How long are the wires? is the phaser ground connected to the ZC702 GND though multiple, short wires? Are the SPI signals separated, or adjacent conductors in a ribbon cable? (ribbon cable can exacerbate crosstalk, unless every other signal is GND.)

    Do you have any scopeshots of the bus traffic? Start by looking at individual edges, and then the timing relationship - setup / hold, and whether the SPI mode is correct.

    -Mark

  • Hi  , first of all, thank you for the detailed pointers, and no worries about the spotty replies.

    I wrote a set of known values to the ADAR1000 scratchpad from userspace (spidev) and read them back. Every read returns 0xFF regardless of what I write. That is consistent with my earlier measurements, where the 3.3V side sits at ~3.335 V and the 1.8V side reads ~0.84 V. I have also verified that CS0 and CS1 both go low when an SPI transaction starts.

    I'll also post a photo of the wiring. Right now it's jumper wires from the PMOD headers J62/J63, with ground going from J62-5, J63-9, and J63-10 to P2-6, P2-14, and P2-25 on the CN0566.





    I also want to clarify a few things from my side. I performed a loopback test on the FPGA side and got the same data back, and the XDC and top module are correct. SCLK, MOSI, CS0, and CS1 reach the 1.8V side of the level translator U1 on the phaser, and CS0 and CS1 also reach the 1.8V side of U27. The translator directions are as intended for both U1 and U27.

    The image below shows SCLK and CS0 on the 3.3V side of the level translator.



  • Hi , i am following the same procedure as mentioned in "SPI Considerations" and "SDO Readback Problem" chapters of the ADAR1000 datasheet

  •   Apologies again for the delay in responding.

    That hardware setup is probably workable - and the photo is clear enough that I'm able to verify at least some of the connections. That said - you can never have too many grounds, I'd recommend connecting as many grounds as you can between the FPGA board and the CN0566, there should be a few spare ground pins (8 total on the Raspberry Pi connector). Also - for the purposes of a return path for digital signals, the 3.3V supply also counts as an AC ground, so connect the other 3.3V supply as well.

    The scope shot looks suspicious - ideally, SPI signals should have nice sharp rising and falling edges with little to no overshoot, rapidly reaching the high and low levels. Notice how your rising edges are really slow, and if I use my imagination, I see a little spike at the leading edge, followed by the exponential rise. This might be the one-shot accelerator in the TXS0108E firing, but somehow the signal is ringing back low again - MAYBE a signal integrity issue.

    The falling edges are also suspicious - at this timescale, they should be nice and snappy. Have you adjusted the compensation on your scope probes, and are you using very short ground connections?

    Even if signal integrity is not the true root cause of the communications issues, it needs to be cleaned up anyway, so let's keep on this approach for the time being.

    One other question - what is your ultimate goal of controlling the CN0566 from your FPGA board? If it's to replace the Pluto with the FMCOMMS4, you could start out just using the Raspberry Pi to control the CN0566 board - PLL, ADAR1000s, etc., and talk to the Pi over an Ethernet connection - if you're running your program directly on the FPGA board, you can connect the Raspberry Pi over an Ethernet connection. We sort of do this with the main phaser Python code already - the code first attempts to connect to the ip:localhost context for the CN0566, and ip:192.168.2.1 for the Pluto (the default USB Ethernet IP address.) If that fails, it assumes it's being run on a remote host, and connects to phaser.local for the CN0566, and phaser.local:50901 for the Pluto. The Raspberry Pi runs a second iiod that forwards the Pluto context on port 50901.

    Of course - if you're going to be steering the beam around quickly you'll have the latency of the network connection, but it may at least let you test out the FMCOMMS4. Oh and note that the Raspberry Pi connector is surface mount, and more fragile than a through-hole one. So be careful if you're going to be mounting / dismounting the Pi.

    -Mark

  • Closing this thread out after confirming the solution with .   , I think you were on the right track!    solved the problem by using the ports on the FMC connector, instead of the PMOD.  He thinks the bidirectional level shifters in the FPGA were the problem.  

  • Hi   and ,

    Thank you both so much for your extended support and guidance in resolving this issue. I really appreciate the time and effort you took to help me troubleshoot the problem.

    I went through and tried all the steps you suggested. After further debugging, the issue was finally resolved by connecting the required SPI lines to the FMC connector. Once this connection was made, the ADAR1000 devices were successfully detected and the scratchpad test passed.

    Your suggestions were extremely helpful in narrowing down the issue and understanding where the problem was occurring. I also learned a lot from the debugging process and from understanding the SPI communication and device probing more deeply.

    Thank you again, Mark and Jon, for your valuable support and for patiently guiding me through the troubleshooting process. I really appreciate your help!

  • Thanks for the feedback  ! We really appreciate it.

    And indeed, these things can be pretty hard to debug sometimes, hardware pointing fingers at software pointing fingers at HDL and vice-versa. It's hard to start at too basic a level:

    • Measure all power supplies, both AC and DC (are they noisy?)
    • Measure all logic high / low levels
    • then look at bus traffic - rising and falling edges, any overshoot / undershoot / ringing?
    • Then verify SPI mode, then timing relationship between edges. 
    • Then read / write scratch registers IF drivers aren't probing

    You did all of that, and got to the solution! Almost forgot - ground integrity, and photograph :) That was really helpful in your situation.

    Here's an informal video I did a while back on setup and hold time, and how to analyze SPI bus timing reqirements: https://www.youtube.com/watch?v=dsx4BKkhRBE

    -Mark

Before You Switch


Switching languages will make ADI Explorer unavailable. Resume your session by switching back to English and reopening ADI Explorer.