Author Topic: How can a 2-channel DSO "trigger and decode" the 4 signal SPI protocol?  (Read 1594 times)

0 Members and 1 Guest are viewing this topic.

Offline sjaTopic starter

  • Newbie
  • Posts: 5
  • Country: it
I see that some 2 channel DSO offer as standard 'Serial bus triggering and decoding' including SPI. For example the Siglent SDS1202X-E.

But SPI has 4 lines: CLK, CS, MISO and MOSI.

So my question is: how can a 2 channel DSO decode the 4 signal SPI?

I guess that you would hook the DSO to the MISO and MOSI buses and the DSO would then deduce the clock speed automatically and decode *all* signals on the MISO/MOSI buses. Is that how they do it?
 

Offline rvalente

  • Frequent Contributor
  • **
  • Posts: 736
  • Country: br
Re: How can a 2-channel DSO "trigger and decode" the 4 signal SPI protocol?
« Reply #1 on: October 19, 2022, 12:33:58 pm »
Easy...

never mind about CS and CLOCK in the trigger channel, I'm pretty sure the Keysight 1052a works this way
 

Online pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4290
  • Country: nl
Re: How can a 2-channel DSO "trigger and decode" the 4 signal SPI protocol?
« Reply #2 on: October 19, 2022, 12:44:49 pm »
Just look at the data stream important to you. So connect CLK and MISO or CLK and MOSI to see what is on the bus.

I don't think it is really possible to decode without the clock and determining the clock from the data signal can be very hard since there is no start or stop bit to go on. So it would need to know the frequency of the clock to be able to make up its own clock by syncing it to an edge on a data line.

Offline sjaTopic starter

  • Newbie
  • Posts: 5
  • Country: it
Re: How can a 2-channel DSO "trigger and decode" the 4 signal SPI protocol?
« Reply #3 on: October 19, 2022, 03:13:58 pm »
Thanks for the replies.

I have a looked again at the Siglent SDS1000X manual and it does seem to be in line with what pcprogrammer suggests. Though I do find the manual to be not very clear at all.

Has anyone ever used the SPI decode feature on a 2 channel DSO?

 

Offline tautech

  • Super Contributor
  • ***
  • Posts: 29335
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: How can a 2-channel DSO "trigger and decode" the 4 signal SPI protocol?
« Reply #4 on: October 19, 2022, 06:40:51 pm »
Thanks for the replies.

I have a looked again at the Siglent SDS1000X manual and it does seem to be in line with what pcprogrammer suggests. Though I do find the manual to be not very clear at all.

Has anyone ever used the SPI decode feature on a 2 channel DSO?
With the 2ch Siglents decoding on a 3 or 4 wire bus use the Clk Timeout feature, a falling edge trigger and Holdoff to prevent retriggering within a packet.

Tell me how that goes and I could post some examples later if required.
Avid Rabid Hobbyist.
Some stuff seen @ Siglent HQ cannot be shared.
 

Online BillyO

  • Super Contributor
  • ***
  • Posts: 1662
  • Country: ca
Re: How can a 2-channel DSO "trigger and decode" the 4 signal SPI protocol?
« Reply #5 on: October 19, 2022, 06:55:01 pm »
If you have an external trigger input you can connect that to CLK and trigger on the falling edge then connect your two channels to you MOSI and MISO.  You may need to adjust your trigger holdoff to get best results.

Otherwise, as previously mentioned, bring CLK into one channel and look at teh data lines separately
Bill  (Currently a Siglent fanboy)
--------------------------------------------------
 

Offline tautech

  • Super Contributor
  • ***
  • Posts: 29335
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: How can a 2-channel DSO "trigger and decode" the 4 signal SPI protocol?
« Reply #6 on: October 19, 2022, 07:04:56 pm »
Not quite Bill.
While these screenshots are from my SDS1104X-E the SDS1202X-E Decode menu is the same excepting you only have 2 channels to work with.
Assign the buss and Clk to the appropriate channel/s and use CS Timeout on the clock.
Couple of screenshots to show where these are.
Avid Rabid Hobbyist.
Some stuff seen @ Siglent HQ cannot be shared.
 

Offline sjaTopic starter

  • Newbie
  • Posts: 5
  • Country: it
Re: How can a 2-channel DSO "trigger and decode" the 4 signal SPI protocol?
« Reply #7 on: October 21, 2022, 07:46:38 am »
Thank you all for your replies.  It is a lot clearer now.
 

Online BillyO

  • Super Contributor
  • ***
  • Posts: 1662
  • Country: ca
Re: How can a 2-channel DSO "trigger and decode" the 4 signal SPI protocol?
« Reply #8 on: October 21, 2022, 02:17:15 pm »
Not quite Bill.
Sorry, I missed that he has a Siglent.
Bill  (Currently a Siglent fanboy)
--------------------------------------------------
 

Online pcprogrammer

  • Super Contributor
  • ***
  • Posts: 4290
  • Country: nl
Re: How can a 2-channel DSO "trigger and decode" the 4 signal SPI protocol?
« Reply #9 on: October 21, 2022, 04:18:49 pm »
Not quite Bill.
Sorry, I missed that he has a Siglent.

Does he really has one? He mentions the Siglent SDS1202X-E as an example but does not state owning one. So it is an assumption :)

Online Fungus

  • Super Contributor
  • ***
  • Posts: 17150
  • Country: 00
Re: How can a 2-channel DSO "trigger and decode" the 4 signal SPI protocol?
« Reply #10 on: October 21, 2022, 04:42:35 pm »
how can a 2 channel DSO decode the 4 signal SPI?

"sub-optimally" and "with a lot of messing around"

 
The following users thanked this post: sja

Offline sjaTopic starter

  • Newbie
  • Posts: 5
  • Country: it
Re: How can a 2-channel DSO "trigger and decode" the 4 signal SPI protocol?
« Reply #11 on: October 21, 2022, 05:03:39 pm »
I think the reply from Fungus sums up well what I have now understood.
 

Offline JDubU

  • Frequent Contributor
  • **
  • Posts: 446
  • Country: us
Re: How can a 2-channel DSO "trigger and decode" the 4 signal SPI protocol?
« Reply #12 on: October 21, 2022, 05:52:17 pm »
Maybe I'm missing something, but I don't know why anyone would use a scope to decode low(ish) bitrate serial protocol streams.
Investigating why a serial interface is failing at the waveform level using a scope can be very useful, but looking for protocol encoding/decoding errors in long data streams is mostly really frustrating.

The proper tool for protocol decoding is a logic analyser like a Saleae (or similar).
 

Online Fungus

  • Super Contributor
  • ***
  • Posts: 17150
  • Country: 00
Re: How can a 2-channel DSO "trigger and decode" the 4 signal SPI protocol?
« Reply #13 on: October 21, 2022, 06:24:41 pm »
Maybe I'm missing something, but I don't know why anyone would use a scope to decode low(ish) bitrate serial protocol streams.
Investigating why a serial interface is failing at the waveform level using a scope can be very useful, but looking for protocol encoding/decoding errors in long data streams is mostly really frustrating.

The proper tool for protocol decoding is a logic analyser like a Saleae (or similar).

Correct.

A 'scope is useful for checking signal integrity and looking at small packets. After that you probably need a logic analyzer.

 

Offline alm

  • Super Contributor
  • ***
  • Posts: 2903
  • Country: 00
Re: How can a 2-channel DSO "trigger and decode" the 4 signal SPI protocol?
« Reply #14 on: October 21, 2022, 07:25:12 pm »
If you have both a scope and a logic analyzer available, and want to just look at the protocol level, then clearly a logic analyzer, or even a protocol analyzer like the TotalPhase devices (I have one I got really cheaply), would be the superior choice. But in a pinch, or if you don't have a logic analyzer available, I could certainly see using a scope for protocol decoding.

And of course where you need mixed signal ability of say the SPI input to a DAC and the analog output from the DAC, but probably not on a 2-channel scope ;)


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf