Skip to main content
Albi G.
Associate III
Jul 15, 2020 1:51 PM UTC
Question

SPI Bus Impedance

Hi guys, i am going to connect 2 STM32 via 3 SPI busses for high speed data transfer throughput (STM32H7 <-> STM32G4).

The STM32G4 will be Master and the SCLK-frequency will be 84MHz - i will use the associated pins in the highest speed mode setting.

I am having an extremely hard time to find any information about layout guidelines for the SPI-Busses in general. Same is true for the MCO-output.

Are there any recommendations which trace impedance to aim for? If possible i like to avoid series resistors for the SPI-Lines - people seem to include those via trial and error or because of good faith... thats not engineering in my mind.

I dont have very long traces (60mm) but i have EMI-sensitive circuitry on board.

Thank you.

This topic has been closed for replies.

12 replies

LMI2
Senior III
Jul 15, 2020 8:46 PM UTC

At 84MHz 60cm wire looks like a transmission line. I would start with a lower speed and add termination when needed. Series termination is one way to terminate transmission lines. That termination resistance you should use depends on what line you are using, I think common IDC cable impedance is around 120ohms. I would use an IDC cable rather than coaxial cable, because IDC cable has higher impedance.

Perhaps you should Google RF transmission line and/or series termination (resistor value).

LMI2
Senior III
Jul 16, 2020 7:30 AM UTC

I see now that it is only 60mm and not 60cm. It makes things easier.

S.Ma
Principal
Jul 15, 2020 8:55 PM UTC

too bad there is no qspi slave mode, would ease things. play with speed gpio and pull down internal resistor to reduce ringing. on the master side, consider spi1 as master and spi2 & 3 as slave using sck1 as reference so all are in sync and toggling at near same time... 84 mhz means master and slave sysclk being 2x or 4x faster...

Albi G.
Albi G.Author
Associate III
Jul 15, 2020 10:58 PM UTC

60 _mm_ ! Only. And i am on PCB, no cable. :)

.: I understand your intentions, but i am not sure if everything synchronized issnt a worse experience at the end.

TDK
Jul 16, 2020 4:09 AM UTC

A signal travels 1.8m in the period of one clock cycle at 84 MHz. I can't imagine it'll matter too much if you leave a 60mm trace unterminated. And if it's unterminated, the trace impedance isn't going to matter much.

"If you feel a post has answered your question, please click ""Accept as Solution""."
Albi G.
Albi G.Author
Associate III
Jul 16, 2020 4:28 AM UTC

That makes no sense in my head.

One should try to match either the source or the load (best both) to reduce the number of reflections - if you have a perfectly unmachted system, the wave is going to be stuck in the trace with no way to escape but radiate away (heat / EMI).

TDK
Jul 16, 2020 5:00 AM UTC
If your load is high impedance, like an MCU pin, you’re not matching it. You’d need to add a terminating resistor and then match that. Which you can do, of course, but it’ll add a complexity. I thought you didnt want to add any resistors.
I think you’ll find modern chips are more tolerant than you’d expect based on internet forums.
Not sure what a “perfectly unmatched�? system is. There are plenty of ways for the signal to dissipate.
Take a nucleo board and test it out.
Just my opinion.
"If you feel a post has answered your question, please click ""Accept as Solution""."
Albi G.
Albi G.Author
Associate III
Jul 16, 2020 5:44 AM UTC

You do not think far enough:

Yes, the Input pin (destination) is unmatched - no discussion there... but what happens, after the wave reflects? Yes - it hits the transmitter again. And what happens next?

a) the transmitter is machted: the wave is absorbed

b) the transmitter is unmatched, the wave reflects again, has no chance do dissipate into heat and/or EMI.

Do you now understand the benefit of even a partial source matching?

waclawek.jan
Super User
Jul 16, 2020 5:36 AM UTC

It's not the data rate which matters here, but frequency content of the signal, i.e. edges slew rate. With sharp edges capable of low 100s of MHz, the harmonic content gets easily into GHz.

Electronics is all about abstraction, i.e. omitting details in order to make the otherwise overly complex problem of signals practically tractable. Digital electronics is all about these abstractions and simplifications. The craft is in judging when these simplifications stop being valid and what to do about it.

You can err on the safe side by massive overengineering and you often do, think about decoupling capacitors: when was it last time when you actually *calculated* what decoupling is needed, and/or actually *verified* validity of chosen decoupling?

Exactly same applies to high speed signals, their integrity, and coupling to neighbouring signals.

Generally, I'd be worried maybe less about termination and track impedances, and more about proper signal return (a.k.a. "ground" which is just another abstraction, and probably the most omitted and most heavily violated one).

HTH,

JW

RMcCa
Senior II
Jul 17, 2020 2:42 PM UTC

From what i can gleen from the h7 rm and datasheet, you want to use the lowest port speed you can to minimize the emi and ringing because the port speed controls the slew rate?

What about the I/O compensation cell? The rm is really sketchy on the subject.​

S.Ma
Principal
Jul 17, 2020 4:37 PM UTC

Focus on the ground loop with single ended signals. Termination built-in pull-down resistor and slew rate control are other tuning knobs to play with.