Noise on GND from SPI (SCK)... what is normal?

JKIM

Active member
I am probing the output of my Teensy 3.1 board which is driving driving some SPI peripherals... Everything works as expected, but I do see some very high frequency noise on the power rails, which is related to the SPI bus whenever SCK is transitioned.

The noise is about 100mV spikes in the 5nS range, measuring straight from the GND to 3.3V on the teensy itself.

So, I wondered if this is normal on the Teensy 3.1?
I thought the decoupling caps would have taken care of (most of) the high frequency noise?

Any insight is appreciated!

JK

View attachment 4216
 
measuring straight from the GND to 3.3V on the teensy itself.
Which 3V3, which GND? Also preferably measured with the ground spring, or a short wire attached to the ground near the tip.
PSo3N.jpg
I can try to measure on mine. What kind of loading do you have on the clock line? (R and C)
I can not open your attachment.
 
100 mV seems like quite a lot. I'd also suspect issues with the measurement technique.

Can you try using pin 14 for SCK, using SPI.setSCK(14) before SPI.begin(), to reconfigure for pin 14.

Because pin 13 has the LED, the SPI library enables the higher current option for the pin. I believe it will default to the lower current option on pin 14. That will likely make some difference. Maybe?
 
100 mV seems like quite a lot. I'd also suspect issues with the measurement technique.

Can you try using pin 14 for SCK, using SPI.setSCK(14) before SPI.begin(), to reconfigure for pin 14.

Because pin 13 has the LED, the SPI library enables the higher current option for the pin. I believe it will default to the lower current option on pin 14. That will likely make some difference. Maybe?

Hmm, thanks for the tips... I was able to get some major improvement by adding even more decoupling 100nF caps on a relatively long trace for the rails and SPI bus. Putting a 20MHz bandwidth limit on the scope and using a shorter ground connection also cleaned up the measurements.

I am using the SPI4Teensy library, is there some documentation on this high current option for the pins?
I did a bit of searching in the Kinetis reference manual without much luck.

JK
 
Hmm, thanks for the tips... I was able to get some major improvement by adding even more decoupling 100nF caps on a relatively long trace for the rails and SPI bus. Putting a 20MHz bandwidth limit on the scope and using a shorter ground connection also cleaned up the measurements.

I am using the SPI4Teensy library, is there some documentation on this high current option for the pins?
I did a bit of searching in the Kinetis reference manual without much luck.

JK

If you want to learn how to do it yourself, perhaps look at chapter 11.14.1 in the refManual.
But i don't know where to find the exact electrical specs.
 
If you want to learn how to do it yourself, perhaps look at chapter 11.14.1 in the refManual.
But i don't know where to find the exact electrical specs.

Wow, even better! thanks!

I turned off the drive strength for SCK and MOSI and get a considerable noise improvement.

I see that PORT_PCR_DSE is being set for any pins designated as output in the pinMode function, how can I determine if/when drive strength is needed on a particular pin?

JK
 
good question :)
if you want to be sure, set it yourself..
don't know.

Edit:
the slew rate can be important too, for fast toggling or a spi-clk
 
Last edited:
good question :)
if you want to be sure, set it yourself..
don't know.

Well, I did the "sensible" thing and disabled DSE in the pinMode function for everything.
I'm not driving any major loads with my output pins, so hopefully it should not be a problem.

Now my noise problem is obsolete, thanks for the help everyone.

JK
 
100 mV seems like quite a lot. I'd also suspect issues with the measurement technique.

Can you try using pin 14 for SCK, using SPI.setSCK(14) before SPI.begin(), to reconfigure for pin 14.

Because pin 13 has the LED, the SPI library enables the higher current option for the pin. I believe it will default to the lower current option on pin 14. That will likely make some difference. Maybe?

Are pins 13 and 14 interchangeable or does 14 have drawbacks vs 13?
 
Wow, even better! thanks!

I turned off the drive strength for SCK and MOSI and get a considerable noise improvement.

I see that PORT_PCR_DSE is being set for any pins designated as output in the pinMode function, how can I determine if/when drive strength is needed on a particular pin?

JK

Hi Everybdy,

I have exactly the same problem.
The SPI exchanges 30 bytes 1000 times per second and Audio Board amplifies annoying 1000Khz signal.

I'm using
Code:
#include <SPI.h>

Can someone, please, point me where to disable DSE for the SPI1?
 
Last edited:
Back
Top