• AVR Freaks

Hot!SPI Intermittent

Author
BumpSplat
Senior Member
  • Total Posts : 163
  • Reward points : 0
  • Joined: 2017/11/06 13:23:11
  • Location: Bend, OR
  • Status: offline
2018/10/15 17:25:42 (permalink)
0

SPI Intermittent

I'm having trouble with the PIC24FJ64GB004 SPI interface.  I am able to issue commands and use the interface driver MCC SPIx_Exchange16bit() successfully many times and then, intermittently, it stops working.  I'm setting CS low then issuing the SPI command.  I have a scope on all lines and they simply stop switching (no clock or data).  I'm beginning to think it might be signal integrity.  I've checked everywhere for buffer over runs or any other thing that may cause this issue.  I've found nothing.  I'd love some input from the guru's in the crowd.  The noise looks off the hook when switching is happening.  Any suggestions would be greatly appreciated.
 
 

Attached Image(s)

#1

6 Replies Related Threads

    qhb
    Superb Member
    • Total Posts : 9998
    • Reward points : 0
    • Joined: 2016/06/05 14:55:32
    • Location: One step ahead...
    • Status: offline
    Re: SPI Intermittent 2018/10/15 17:30:32 (permalink)
    4 (1)
    Yes, the noise looks excessive.
    Are you sure your scope probe is correctly grounded?
    Can you tell us a bit more about your board, or post a photo?
     

    Nearly there...
    #2
    BumpSplat
    Senior Member
    • Total Posts : 163
    • Reward points : 0
    • Joined: 2017/11/06 13:23:11
    • Location: Bend, OR
    • Status: offline
    Re: SPI Intermittent 2018/10/15 20:31:14 (permalink)
    0
    The board layout isn't mine, I am collecting the layout info now.  The grounding is solid.  I'm grounding the probes at the 3V linear regulator. 
    #3
    NKurzman
    A Guy on the Net
    • Total Posts : 17716
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: SPI Intermittent 2018/10/15 20:44:57 (permalink)
    4 (2)
    The ground clip should be near the chip. That is what the chip will see. If it is bad there, is bad.
    #4
    BumpSplat
    Senior Member
    • Total Posts : 163
    • Reward points : 0
    • Joined: 2017/11/06 13:23:11
    • Location: Bend, OR
    • Status: offline
    Re: SPI Intermittent 2018/10/15 21:40:47 (permalink)
    0
    I moved the ground right onto the chip.  The noise dropped a 100mV maybe...
     
    #5
    NKurzman
    A Guy on the Net
    • Total Posts : 17716
    • Reward points : 0
    • Joined: 2008/01/16 19:33:48
    • Location: 0
    • Status: online
    Re: SPI Intermittent 2018/10/15 22:06:18 (permalink)
    4 (1)
    Then what ever is there is real noise you chip is seeing too.
    #6
    BumpSplat
    Senior Member
    • Total Posts : 163
    • Reward points : 0
    • Joined: 2017/11/06 13:23:11
    • Location: Bend, OR
    • Status: offline
    Re: SPI Intermittent 2018/10/17 13:10:49 (permalink)
    0
    The issue appears to be cross coupling through the power supply.  I added a retry and it now passes.  The board is being re-layed out now.  Thanks to all for the help.
     
     
    #7
    Jump to:
    © 2019 APG vNext Commercial Version 4.5