Skip to main content
Visitor II
December 21, 2023
Question

SPI exhibit too much noise

  • December 21, 2023
  • 3 replies
  • 3729 views

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?  

    This topic has been closed for replies.

    3 replies

    Graduate
    December 21, 2023

    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.

    Graduate II
    December 21, 2023

    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.

    Super User
    December 21, 2023

    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 )

     

    Technical Moderator
    December 21, 2023

    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!

    Visitor II
    December 23, 2023

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

    Graduate
    December 23, 2023

    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.