1
\$\begingroup\$

I have four SPI-controlled chips which I want to control from Zynq-7020 via an FMC LPC connector. Each chip/device requires an SCLK, MISO, MOSI and CS line.

I'd like to give each device their own separate SPI bus, but for my given application, I don't have enough clock capable (CC) pins on the FMC LPC connector to give each device their own SPI SCLK. I do have enough pins to give each device separate MISO, MOSI and CS lines. There are a few options on what I could do, and I am wondering what the advantages/disadvantages of each would be:

1) Every device shares a single SPI bus (Separate CS lines, but shared SCLK, MISO, MOSI)

2) Shared SCLK, but separate MISO, MOSI, and CS lines for each device

3) Separate SPI buses, driving SCLKs through LA pins instead of CC pins on the FMC LPC interface. (I am not sure if my FPGA would like that I am driving a clock from a non-CC pin)

My target device is a PCB, what implications would each of the three options have on my design, and what would be the best option?

\$\endgroup\$
4
  • 2
    \$\begingroup\$ Give the FMC spec a careful reading -- your SPI clocks are probably going to be well within the speed that the LPC data pins can handle. I suspect -- but don't know -- that "clock capable" means clocks at FPGA-ish speeds, not SPI-ish speeds. \$\endgroup\$
    – TimWescott
    Commented Apr 3, 2019 at 0:13
  • \$\begingroup\$ @TimWescott Do you have a link to the spec? I am unable to find one that defines the pin speeds and capabilities \$\endgroup\$
    – RN_
    Commented Apr 3, 2019 at 0:33
  • 1
    \$\begingroup\$ I don't, but my gut feel is that if you're going to be clocking at 1MHz or less you can just use single-ended data lines and don't worry. If you're going to be clocking up to 20MHz or so, you can probably get away with it, but if it were me I'd want to look at the signals on a scope. \$\endgroup\$
    – TimWescott
    Commented Apr 3, 2019 at 0:53
  • \$\begingroup\$ you are probably right - I will try to get 1mhz off the pin on my scope and see. I want to be thorough as this is my first pcb! \$\endgroup\$
    – RN_
    Commented Apr 3, 2019 at 1:39

3 Answers 3

1
\$\begingroup\$

Having separate MOSI/MISO/CLOCK for generic sub-megahertz devices in SPI bus defeats the purpose of a SPI bus.

You only need to separate them if they have different priorities, one goes off board via wire or some other case. In those cases you should select the microcontroller to have enough built-in hardware SPIs. That would be if your FW has a state where it only polls the most critical bus or reacts to interrupts from a bus or such.

If you do have some specific edge case that doesn't fit the previous, you could use a one directional logic buffer circuit for MOSI and CLK to distribute them in separately.

Or you could use a SPI/generic multi signal mux, possibly a short circuit proof one might come in handy.

\$\endgroup\$
0
\$\begingroup\$

1 - If your SPI clock is slow, less than 10 MHz, you can use a GPIO to generate the clock. At this speed, you have enough timing margin, you don't need a dedicated clock output. The SPI "Clock" can be generated using a counter.

2 - Having a dedicated SPI clock is usually better for EMC. I have a seen a few cases where a slow-ish free-running clock would cause noise and EMC problems.

3 - Having seperate SPI links mean you can communicate in parallel with these devices. It can be helpful in some applications...

\$\endgroup\$
1
  • \$\begingroup\$ The problem isn't clock outputs -- you can basically output a clock from any pin with a DDR output buffer -- but pins on the connector. Probably a non-issue, as the connector manufacturer's definition of a clock is in the GHz range. \$\endgroup\$ Commented Oct 24, 2020 at 15:37
0
\$\begingroup\$

In applications where there is risk of noise from the SPI CLK - I have used a multi in/out MUX IC for attaching multiple devices to the same bus. The MUX will act like a pass transistor. At higher SPI frequencies this may be harder to achieve due to impedance matching.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.