Products > Test Equipment
Help wanted having Siglent SDS1102X decode SPI [SOLVED]
(1/3) > >>
VinzC:
Hi all.

I just can't for the life of me have my scope decode SPI signals. Here's the context:

I wrote an Arduino sketch that uses SPI to control a serial display. The code works and the display, too, as expected. I also wanted to compare that sketch to some other code I wrote, so I needed to see SPI signals and actually decode that, it's just easier (nothing too fancy here, right).

So I hooked my scope's probes to MOSI and SCK. I set the decode type to SPI, set MOSI to channel 2 and CLK to channel 1, properly set the threshold values to 2.6-2.8V or thereabouts, set the clock edge to rising and... nothing. Or shall I say, that damn thing only sees zeroes. I **know** for a fact the edge is "Rising" since I programmed the SPI bus of my ATmega2560 to "MODE0" (i.e. shift on falling, latch on rising, basically). If I switch the CLK signal from "falling" to "rising", then I get... nothing at all!

I then got back to the f*** manual, saw that I forgot to also program the CS channel. I then set it to "CLK time-out", redid the measurements... no friggin' change!

Is it me or that damn' thing?

Attached is my situation as last described. The scope should *at least* read something like 0x00, 0x81, 0x8<something> but no. Doesn't even read anything.
EDIT: The next two pictures show the signals from the Arduino, MOSI on top and CLK below. Superimposed on the second pic is the "Decode" overlay. Complete crap, as you can see.

Is it really hopeless?

Note: I've used I²C before and, contrary to my SPI experience, it was really great. It's probably the first time I ever needed to decode SPI (or I just forgot I did in the past, quite possible).

Anyway thanks for any hint or suggestion.
tautech:
Older SDS1102X ?
Firmware version please ?

Have you set the Decode Idle state correctly ?

FWIW I always make settings to get rock solid triggering usually by adding some trigger Holdoff to prevent retriggering within a packet.
SPI decode with just 2 channels is no problem when CS is set correctly.
2 screenshots from SDS1104X-E that might help you get settings correct, note the DSO is still in Run mode.
VinzC:

--- Quote from: tautech on February 28, 2024, 08:07:05 pm ---Older SDS1102X ?
--- End quote ---
That is possible...


--- Quote from: tautech on February 28, 2024, 08:07:05 pm ---Firmware version please ?
--- End quote ---

Sure, here goes:
Software version: 1.1.2.13 R5
FPGA version: 16.8.2
Hardware version: 3-3
Product: SDS1102X


--- Quote from: tautech on February 28, 2024, 08:07:05 pm ---Have you set the Decode Idle state correctly ?

--- End quote ---
To be honest I have no idea what you're talking about. I have read about that in the manual but I have never seen such an option anywhere when looking for clues as I'm using my scope — and I usually lookup thoroughly before I go ask. FWIW I remember I²C decoding was pretty straightforward; is setting up SPI decoding not similar?

(okay, I know it's not, but I'm only talking about the way to setup signal levels other than the threshold levels available through the buttons on the bottom of the screen.)


--- Quote from: tautech on February 28, 2024, 08:07:05 pm ---FWIW I always make settings to get rock solid triggering usually by adding some trigger Holdoff to prevent retriggering within a packet.
SPI decode with just 2 channels is no problem when CS is set correctly.
2 screenshots from SDS1104X-E that might help you get settings correct, note the DSO is still in Run mode.

--- End quote ---

Well, I enabled SPI and used single mode, if that can help. I tried SPI decoding *after* having captured a single shot but also *before* single shot. No difference. Fact is I can't plug in a CS probe since it's a 2-channel scope and I need both clock and data (obviously). Therefore I set CS to "time-out". Is *that* the "idle state" you were talking about?

EDIT: BTW the said clock from the Arduino is around 80kHz. However I tried various duration settings for Clock Time out to no avail. But I might have not waited long enough for decoding to update appropriately. I might have to try again, just to be sure.
mwb1100:

--- Quote from: VinzC on March 02, 2024, 10:26:38 am ---Software version: 1.1.2.13 R5

--- End quote ---

You should update the firmware.  The release notes indicate that there were fixes for decode.
VinzC:

--- Quote from: mwb1100 on March 02, 2024, 04:43:25 pm ---You should update the firmware.  The release notes indicate that there were fixes for decode.

--- End quote ---
Thanks! I suppose I shall upgrade to SDS1000X/X+ Firmware - 1.1.1.2.15R10, right?

Are there any catch/glitch? (I mostly fear losing functionalities, paranoid mode, if you see what I mean.)
Navigation
Message Index
Next page
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod