Author Topic: Help wanted having Siglent SDS1102X decode SPI [SOLVED]  (Read 9664 times)

0 Members and 1 Guest are viewing this topic.

Offline VinzCTopic starter

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: be
  • See you later, oscillator.
Help wanted having Siglent SDS1102X decode SPI [SOLVED]
« on: February 28, 2024, 03:34:42 pm »
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.
« Last Edit: March 04, 2024, 01:22:26 pm by VinzC »
 

Online tautech

  • Super Contributor
  • ***
  • Posts: 29382
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Help wanted having Siglent SDS1102X decode SPI...
« Reply #1 on: February 28, 2024, 08:07:05 pm »
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.
Avid Rabid Hobbyist.
Some stuff seen @ Siglent HQ cannot be shared.
 
The following users thanked this post: VinzC

Offline VinzCTopic starter

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: be
  • See you later, oscillator.
Re: Help wanted having Siglent SDS1102X decode SPI...
« Reply #2 on: March 02, 2024, 10:26:38 am »
Older SDS1102X ?
That is possible...

Firmware version please ?

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

Have you set the Decode Idle state correctly ?
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.)

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.

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.
« Last Edit: March 02, 2024, 11:59:15 am by VinzC »
 

Offline mwb1100

  • Frequent Contributor
  • **
  • Posts: 530
  • Country: us
Re: Help wanted having Siglent SDS1102X decode SPI...
« Reply #3 on: March 02, 2024, 04:43:25 pm »
Software version: 1.1.2.13 R5

You should update the firmware.  The release notes indicate that there were fixes for decode.
 
The following users thanked this post: VinzC

Offline VinzCTopic starter

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: be
  • See you later, oscillator.
Re: Help wanted having Siglent SDS1102X decode SPI...
« Reply #4 on: March 02, 2024, 05:17:53 pm »
You should update the firmware.  The release notes indicate that there were fixes for decode.
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.)
 

Offline wasedadoc

  • Super Contributor
  • ***
  • Posts: 1631
  • Country: gb
Re: Help wanted having Siglent SDS1102X decode SPI...
« Reply #5 on: March 02, 2024, 05:43:52 pm »
Therefore I set CS to "time-out". Is *that* the "idle state" you were talking about?
Look at the bottom left corner of tautech's second screengrab.
 
The following users thanked this post: tautech, VinzC

Offline VinzCTopic starter

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: be
  • See you later, oscillator.
Re: Help wanted having Siglent SDS1102X decode SPI...
« Reply #6 on: March 02, 2024, 06:35:15 pm »
Therefore I set CS to "time-out". Is *that* the "idle state" you were talking about?

[[(puzzle solving mode ON)
Look at the bottom left corner of tautech's second screengrab.

So the answer is "yes", apparently.
(puzzle solving mode OFF)]]

 ;)
« Last Edit: March 02, 2024, 09:12:55 pm by VinzC »
 

Offline mwb1100

  • Frequent Contributor
  • **
  • Posts: 530
  • Country: us
Re: Help wanted having Siglent SDS1102X decode SPI...
« Reply #7 on: March 02, 2024, 08:04:35 pm »
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.)

I definitely get what you mean.  I'd go for the most recent - it's been out for 5+ years so they must not get many complaints about it.  You should be able to roll back to an earlier firmware if you do have trouble (though there's no download for 1.1.2.13 R5 so you might not be able to easily get back to where you are).  At least I know that for the SDS1202X-E 'upgrading' to an earlier firmware is possible - I assume that's also true for the SDS1102X.
 
The following users thanked this post: VinzC

Online tautech

  • Super Contributor
  • ***
  • Posts: 29382
  • Country: nz
  • Taupaki Technologies Ltd. Siglent Distributor NZ.
    • Taupaki Technologies Ltd.
Re: Help wanted having Siglent SDS1102X decode SPI...
« Reply #8 on: March 02, 2024, 08:15:55 pm »
Are there any catch/glitch? (I mostly fear losing functionalities, paranoid mode, if you see what I mean.)
After 100's of firmware installs before dispatch with never an issue .....
Just be sure not to do it in a storm when you you might lose power part way through....or use a UPS for additional protection.
https://int.siglent.com/upload_file/zip/firmware/Oscilloscope/SDS1000X_1.1.1.2.15R10_EN.zip
Avid Rabid Hobbyist.
Some stuff seen @ Siglent HQ cannot be shared.
 
The following users thanked this post: VinzC

Offline VinzCTopic starter

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: be
  • See you later, oscillator.
Re: Help wanted having Siglent SDS1102X decode SPI...
« Reply #9 on: March 02, 2024, 09:12:07 pm »
Just be sure not to do it in a storm when you you might lose power part way through....or use a UPS for additional protection.

Doubtlessly words of wisdom :-+ Outages are not that rare indeed where I live. Fortunately, enough so that I can flash my gear without a hickup.

Thanks to all for your hindsight. Definitely appreciated.

So answering my own question: turns out it was that damn' thing... which wouldn't decode the data because of the time base being set too slow¹. Definitely a trap for young players, to paraphrase Dave ;-) .

¹ I had to capture an entire set of frames to see the complete traffic. That amounts to 2 x 40 plus three bytes in total. So IIRC I had set the time base to get more than 20ms sweep. I'll do the upgrade and see what happens.
« Last Edit: March 02, 2024, 09:19:13 pm by VinzC »
 
The following users thanked this post: tautech

Offline VinzCTopic starter

  • Frequent Contributor
  • **
  • Posts: 277
  • Country: be
  • See you later, oscillator.
Re: Help wanted having Siglent SDS1102X decode SPI...
« Reply #10 on: March 04, 2024, 12:18:35 pm »
The mighty scope was updated flawlessly although I haven't yet checked every single of its features. With that said I went much further than I ever could with this project and I finally got decoding done properly. Judge by yourself.

So thanks again to all for your help :-+

(The last image shows CS time out)
« Last Edit: March 04, 2024, 12:20:44 pm by VinzC »
 
The following users thanked this post: mwb1100


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf