cancel
Showing results for 
Search instead for 
Did you mean: 

SPI exhibit too much noise

StanCosgrove
Associate II

I m using STM32IDE ioc to generate SPI signal hardware NSS, CPOL 1, CPHAS 0 and it was working fine until recently lots of overshoot and undershoot appear, which causes the slave device to fail all data transmit to MCU. i enclosed the waveform, anyone can advise whats causing this?  

6 REPLIES 6
ONadr.1
Senior III

It was working fine before and suddenly it stopped working? I would focus on whether something else changed in HW or SW.

If no changes have been made, it can most often be a defect in the power supply (increased noise) or defective decoupling capacitors. It can also be a defective soldering.

For more precise advice, it would need a lot more information about the wiring, PCB, SPI device. Better pictures from the oscilloscope, type of oscilloscope and probes, etc.

AScha.3
Chief III

H7 can switch very fast - to reduce the ringing on the lines, you can :

1. keep connections (signal + gnd ! ) short, 50mm max. length

2. set port/pin speed to low or medium (lowest possible, so your connection still working fine)

3. maybe : add damping resistors in the signal lines (27 ... 100 ohms )

 

If you feel a post has answered your question, please click "Accept as Solution".

I agree with @ONadr.1 regarding the need for specific setup information.

It could also be poor grounding e.g. loss of ground connection , or crosstalk between signals e.g. on a ribbon cable with no surrounding ground guard signals.

FBL
ST Employee

Hello @StanCosgrove 

Are you using custom board? The issue seems to be more likely linked to your hardware routing and grounding. You may need to provide more details about your setup to help!

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.


I'm out of offce with limited access to my emails.
Happy New Year!

i m using H743 nucleo board and the slave device is a TI ADC implemented on a breadboard...

Breadboard cause nearly 100% of all problems. Use prototype PCB, solder IC and and do properly decoupling and short, ground separated wiring for SPI. I bet the problem disapear.