Post History
At 1 MHz it's probably not transmission line effects. It's not clear from your question whether the SPI bus works on the main board with the expansion board connected, but not when it's not connec...
Answer
#1: Initial revision
At 1 MHz it's probably not transmission line effects. It's not clear from your question whether the SPI bus works on the main board with the expansion board connected, but not when it's not connected. If so, I expect you're right about the additional capacitance. An easy way to check this is to add a little deliberate capacitance on each SPI line to ground. Perhaps you can do this with an expansion board connector that only has the caps and doesn't connect to any expansion board. Or solder two caps to the bottom of the expansion connector pins. I'd start with 100 pF caps. If your SPI drivers have 100 Ω output impedance, that's a time constant of 10 ns. 95% settling requires 3 time constants, so 30 ns. You say the SPI bus is running at 1 MHz, so 500 ns levels. 30 ns is a small time compared to that. If adding deliberate caps instead of the expansion board does make the SPI more robust, then it would be good to understand why. Again, I expect it's not transmission line reflections, especially since it gets better when you make the lines longer. My guess is crosstalk. Capacitance on the lines lowers their impedance at high frequencies, reducing the noise from capacitively coupled edges. Still, this shouldn't be happening on a reasonably designed circuit board. I suspect the real problem is bad layout. Do you have a board-wide ground plane? Do all ICs have bypass caps between their power and ground pins, physically close to those ICs? Are the SPI lines straight within reason? I expect that after some investigation you'll find the answer to one or more of these questions to be "no".