This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

SPI Master MISO Noise Issue

I'm trying to connect to a ST LSM6DS3 via SPI on the Nordic chip. I have used SPI on Nordic with other peripherals but couldn't seem to get it to work with this ST chip. Eventually, after debugging it from a firmware stand-point I decided to scope it out and see if the SPI signals were corresponding to what I was getting in firmware. What I discovered is the two situations:

  1. when I probe MISO when it is disconnected to the Nordic chip the response from the ST chip is correct. Nice clean crisp signal

  2. When I probe it with MISO connected to the Nordic chip I get some sort of noise.

I included the two captures below and was hoping to get an idea why the SPI interface is behaving like this. Does anyone know why it is doing this and how to make it stop? Do I have some internal pull-up/pull-down's configured incorrectly? I am a bit out of ideas... :/

Good Response with MISO Disconnected From Nordic Chip

MISO Connected to Nordic -- Noisey(?)

Zoom of Noise

ST Datasheet: www.st.com/.../DM00133076.pdf

Parents
  • Nordic SPI module is known to work correctly with many known external sensors. I would not suspect that SPI on nordic itself is misbehaving.

    from the product specification

    "To secure correct behavior in the SPI, the pins used by the SPI must be configured in the GPIO peripheral as described in Table 60 prior to enabling the SPI. The SCK must always be connected to a pin, and that pin's input buffer must always be connected for the SPI to work. This configuration must be retained in the GPIO for the selected IOs as long as the SPI is enabled.
    Only one peripheral can be assigned to drive a particular GPIO pin at a time, failing to do so may result in unpredictable behavior."
    

    I think the PULL direction on MISO conflicts on both direction (Nordic and ST). Looking at the timing on your oscilloscope, the value on MISO looks very stable on the rising edge of clock. So, if you are using SPI mode0 then even with this spurs, MISO values should have been sampled correctly.

    Are these spurs making your SPI behave in an erroneous way?

Reply
  • Nordic SPI module is known to work correctly with many known external sensors. I would not suspect that SPI on nordic itself is misbehaving.

    from the product specification

    "To secure correct behavior in the SPI, the pins used by the SPI must be configured in the GPIO peripheral as described in Table 60 prior to enabling the SPI. The SCK must always be connected to a pin, and that pin's input buffer must always be connected for the SPI to work. This configuration must be retained in the GPIO for the selected IOs as long as the SPI is enabled.
    Only one peripheral can be assigned to drive a particular GPIO pin at a time, failing to do so may result in unpredictable behavior."
    

    I think the PULL direction on MISO conflicts on both direction (Nordic and ST). Looking at the timing on your oscilloscope, the value on MISO looks very stable on the rising edge of clock. So, if you are using SPI mode0 then even with this spurs, MISO values should have been sampled correctly.

    Are these spurs making your SPI behave in an erroneous way?

Children
No Data
Related