Help wanted having Siglent SDS1102X decode SPI [SOLVED] - Page 1
Forum section: electronics / testgear

author: VinzC
author_rank: Frequent Contributor
timestamp: February 28, 2024, 03:34:42 pm
content: 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 tochannel 2and CLK tochannel 1, properly set the threshold values to2.6-2.8Vor thereabouts, set theclock edgetorisingand... 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 like0x00,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.

author: tautech
author_rank: Super Contributor
timestamp: February 28, 2024, 08:07:05 pm
content: 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.

author: VinzC
author_rank: Frequent Contributor
timestamp: March 02, 2024, 10:26:38 am
content: Quote from: tautech on February 28, 2024, 08:07:05 pmThat is possible...Quote from: tautech on February 28, 2024, 08:07:05 pmSure, here goes:Software version:1.1.2.13 R5FPGA version:16.8.2Hardware version:3-3Product:SDS1102XQuote from: tautech on February 28, 2024, 08:07:05 pmTo 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 pmWell, 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.

author: mwb1100
author_rank: Frequent Contributor
timestamp: March 02, 2024, 04:43:25 pm
content: Quote from: VinzC on March 02, 2024, 10:26:38 amYou shouldupdate the firmware. Therelease notesindicate that there were fixes for decode.

author: VinzC
author_rank: Frequent Contributor
timestamp: March 02, 2024, 05:17:53 pm
content: Quote from: mwb1100 on March 02, 2024, 04:43:25 pmThanks! I suppose I shall upgrade toSDS1000X/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.)

author: wasedadoc
author_rank: Super Contributor
timestamp: March 02, 2024, 05:43:52 pm
content: Quote from: VinzC on March 02, 2024, 10:26:38 amLook at the bottom left corner of tautech's second screengrab.

author: VinzC
author_rank: Frequent Contributor
timestamp: March 02, 2024, 06:35:15 pm
content: Quote from: VinzC on March 02, 2024, 10:26:38 am[[(puzzle solving modeON)Quote from: wasedadoc on March 02, 2024, 05:43:52 pmSo the answer is "yes", apparently.(puzzle solving modeOFF)]]

author: mwb1100
author_rank: Frequent Contributor
timestamp: March 02, 2024, 08:04:35 pm
content: Quote from: VinzC on March 02, 2024, 05:17:53 pmI 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.

author: tautech
author_rank: Super Contributor
timestamp: March 02, 2024, 08:15:55 pm
content: Quote from: VinzC on March 02, 2024, 05:17:53 pmAfter 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

author: VinzC
author_rank: Frequent Contributor
timestamp: March 02, 2024, 09:12:07 pm
content: Quote from: tautech on March 02, 2024, 08:15:55 pmDoubtlessly words of wisdomOutages 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 atrap 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.

author: VinzC
author_rank: Frequent Contributor
timestamp: March 04, 2024, 12:18:35 pm
content: 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)