How can a 2-channel DSO "trigger and decode" the 4 signal SPI protocol? - Page 1
Forum section: electronics / testgear

author: sja
author_rank: Newbie
timestamp: October 19, 2022, 12:10:06 pm
content: 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?

author: rvalente
author_rank: Frequent Contributor
timestamp: October 19, 2022, 12:33:58 pm
content: Easy...never mind about CS and CLOCK in the trigger channel, I'm pretty sure the Keysight 1052a works this way

author: pcprogrammer
author_rank: Super Contributor
timestamp: October 19, 2022, 12:44:49 pm
content: 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.

author: sja
author_rank: Newbie
timestamp: October 19, 2022, 03:13:58 pm
content: 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?

author: tautech
author_rank: Super Contributor
timestamp: October 19, 2022, 06:40:51 pm
content: Quote from: sja on October 19, 2022, 03:13:58 pmWith 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.

author: BillyO
author_rank: Super Contributor
timestamp: October 19, 2022, 06:55:01 pm
content: 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

author: tautech
author_rank: Super Contributor
timestamp: October 19, 2022, 07:04:56 pm
content: 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.

author: sja
author_rank: Newbie
timestamp: October 21, 2022, 07:46:38 am
content: Thank you all for your replies. It is a lot clearer now.

author: BillyO
author_rank: Super Contributor
timestamp: October 21, 2022, 02:17:15 pm
content: Quote from: tautech on October 19, 2022, 07:04:56 pmSorry, I missed that he has a Siglent.

author: pcprogrammer
author_rank: Super Contributor
timestamp: October 21, 2022, 04:18:49 pm
content: Quote from: BillyO on October 21, 2022, 02:17:15 pmDoes he really has one? He mentions the Siglent SDS1202X-E as an example but does not state owning one. So it is an assumption

author: Fungus
author_rank: Super Contributor
timestamp: October 21, 2022, 04:42:35 pm
content: Quote from: sja on October 19, 2022, 12:10:06 pm"sub-optimally" and "with a lot of messing around"

author: sja
author_rank: Newbie
timestamp: October 21, 2022, 05:03:39 pm
content: I think the reply from Fungus sums up well what I have now understood.

author: JDubU
author_rank: Frequent Contributor
timestamp: October 21, 2022, 05:52:17 pm
content: 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).

author: Fungus
author_rank: Super Contributor
timestamp: October 21, 2022, 06:24:41 pm
content: Quote from: JDubU on October 21, 2022, 05:52:17 pmCorrect.A 'scope is useful for checking signal integrity and looking at small packets. After that you probably need a logic analyzer.

author: alm
author_rank: Super Contributor
timestamp: October 21, 2022, 07:25:12 pm
content: 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