Jump to content

Ashwin10

Members
  • Posts

    3
  • Joined

  • Last visited

Posts posted by Ashwin10

  1. Hi, 

    I am using protocol analyzer to monitor a SPI bus..

    I have a STM32MCU used as SPI master, configured to run full duplex communication. There is no slave connected and I am just trying to understand the protocol itself.

    It is configured the following way: CPHA = 0, CPOL = 0

    I have plugged the 1st Probe(Orange) to the CLK and 2nd Probe(Blue) to the MOSI pins and I record the waveform, Parallelly I have made the following connections to the digital inputs to record them on the Protocol analyzer

    DI 1(Green Wire) -> CLK

    DI 2(Purple Wire) -> MOSI 

    The purpose of this connection is to monitor the CLK and DATA out from the SPI using Scope and Protocol analyzer. 

    The logic I have written in the STM32MCU is to send a value "0x1" out via SPI pin whenever a push button is pressed.

    Below is the image of the data out from SPI that is captured in scope, the data out from the MCU is correct, every time I press the push button(SW delay is provided to prevent debouncing)

     

    Case1.thumb.png.60325ed248d8125168417c0a33c1481a.png

     

    However I observe a different pattern while Spying the bus using protocol analyzer. I see the data being shifted every time I press the button(Image Below). You can see that the "11" values are being shifted every time I press the push button. The data transmitted is wrong (It sends "11" instead of 1)

    Case2.thumb.png.3f27afe0355822c931619a41733588ae.png

     

    My question is, if the data is shifted in the protocol analyzer window why bit shifting does not show on the scope?

     

     

×
×
  • Create New...