Author Topic: Yet another scope question: DS1054Z + 45MHz SPI  (Read 4614 times)

0 Members and 1 Guest are viewing this topic.

Offline sleziak

  • Newbie
  • Posts: 2
  • Country: gb
Yet another scope question: DS1054Z + 45MHz SPI
« on: September 10, 2015, 04:34:57 pm »
Hi, newcomer here! I've been a Dave's fan for years now, I'm really thankful for all the knowledge he has passed onto us

Recently I've started building quite a complicated system that incorporates 45Mhz SPI communication between two microcontrollers for WiFi together with a RGB display driver and SDIO.
Everything worked fine until I entered the 20 MHz+ domain. Packets got lost, hard faults occurred, bits got shifted and without a decent scope I am unable to continue with the project

I was planning to do the following; Purchase a Rigol DS1054Z, "upgrade" it to 100MHz and debug the system, especially the 45 MHz bus
My question here is: would a DS1054Z @ 100Mhz be adequate for my requirements?




Regards, Marcin
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5123
  • Country: gb
Re: Yet another scope question: DS1054Z + 45MHz SPI
« Reply #1 on: September 10, 2015, 04:55:32 pm »
I'd say that while it might help, I can't really recommended it. Although Nyquist says yes from a sampling rate perspective, it will be marginal and the capacitance of the stock probes will start to be quite significant: they will certainly load your circuit.

Note that the sampling rate drops to 250MHz with three or four channels, which you'll probably be using with SPI.

If you're already experiencing signal integrity problems anyway at 45MHz, a DS1054Z solution might well not give you enough information to resolve it as well as significantly affecting your timing due to probe loading.

Having said all that, a DS1054Z is certainly be better than no scope at all. If you can accept its limitations and work around them you might find it good enough with a bit of understanding of its limitations and perhaps with some creative probing.

I do accept though that ramping up to a 200MHz or higher bandwidth DSO with a reasonably high sampling rate is a significant step up.
 

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 12593
  • Country: 00
Re: Yet another scope question: DS1054Z + 45MHz SPI
« Reply #2 on: September 10, 2015, 05:15:13 pm »
I was planning to do the following; Purchase a Rigol DS1054Z, "upgrade" it to 100MHz and debug the system, especially the 45 MHz bus
My question here is: would a DS1054Z @ 100Mhz be adequate for my requirements?
No.

A square wave at 45MHz is really a 45MHz sine wave with layered sine wave harmonics at 135Mhz, 225MHz, ....etc.

On a 'scope with 100MHz bandwidth you'll only be able to see the 45MHz sine wave clearly.  Even the 135Mhz harmonic will be greatly attenuated.

Result: You won't be able to tell much about the signal edges, signal rise times, etc. - which is important for debugging this.

I'd say you need at least 200MHz bandwidth to see if the signal is reasonably clean or not. Even so it won't be the precise square wave you're expecting to see, it will be like the third waveform in this image (actually slightly worse because 225MHz doesn't quite fit in there):



« Last Edit: September 10, 2015, 05:25:48 pm by Fungus »
 

Offline marshallh

  • Supporter
  • ****
  • Posts: 1462
  • Country: us
    • retroactive
Re: Yet another scope question: DS1054Z + 45MHz SPI
« Reply #3 on: September 10, 2015, 05:24:23 pm »
The scope will just tell you "your SI sucks". So, fix the issue by making a proper pcb, return paths for every signal, source termination, etc. You can still use the scope to make sure SPI looks like it should, but you wont get the full picture.
Verilog tips
BGA soldering intro

11:37 <@ktemkin> c4757p: marshall has transcended communications media
11:37 <@ktemkin> He speaks protocols directly.
 

Offline Karel

  • Super Contributor
  • ***
  • Posts: 1751
  • Country: 00
Re: Yet another scope question: DS1054Z + 45MHz SPI
« Reply #4 on: September 10, 2015, 05:29:05 pm »
When measuring digital signals like SPI, as a rule of thumb, the analog bandwidth of the oscilloscope,
including the probe, must be at least 10 times the bitrate of the signal of interest.
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 10316
  • Country: my
  • reassessing directives...
Re: Yet another scope question: DS1054Z + 45MHz SPI
« Reply #5 on: September 10, 2015, 05:32:21 pm »
...complicated system that incorporates 45Mhz SPI communication...
to look at decent 45MHz clocked square wave, i'd say 10x of it, get a 450MHz scope...
It's extremely difficult to start life.. one features of nature.. physical laws are mathematical theory of great beauty... You may wonder Why? our knowledge shows that nature is so constructed. We simply have to accept it. One could describe the situation by saying that... (Paul Dirac)
 

Offline sleziak

  • Newbie
  • Posts: 2
  • Country: gb
Re: Yet another scope question: DS1054Z + 45MHz SPI
« Reply #6 on: September 10, 2015, 05:33:45 pm »
@Howardlong,  Fungus, Karel and Mechatrommer
Thank you for your replies, I was afraid that the bandwidth won't be enough to get any useful information at those frequencies. But I do have to agree that any scope is better than no scope, I'm ordering the rigol soon.

@marshallh, you are 100% correct, it's surprising that I get any SPI data with the current hardware setup. The first prototype PCBs will come once I overcome some software quirks and make up my mind on the WiFi chipset. There is so many possible problems with the way I am handling the current communication, one of the issues is that some data packets inherit bits from previous packets ie: a string of "10101010" bits becomes "01010101" which might indicate interrupt problems or SCK synchronization issues. Once I get the scope I hope that I will be able to do some basic debugging like this in order to rule out software issues.

All your input is greatly appreciated!
 

Offline Fungus

  • Super Contributor
  • ***
  • Posts: 12593
  • Country: 00
Re: Yet another scope question: DS1054Z + 45MHz SPI
« Reply #7 on: September 10, 2015, 05:34:08 pm »
The scope will just tell you "your SI sucks".

("Signal Integrity")

Yes, the DS1054Z will let you see any major faults and tell you if it's a complete trainwreck. That *might* be enough to get it working even if it still doesn't have perfect signals

There's no guarantees though. A 200+MHz 'scope is a safer bet.

nb. 200MHz is the minimum I'd consider for this - square waves have infinite bandwidth! (unlike our hardware budgets). The important thing is to know what you're looking at. Keep the harmonics thing in mind whenever you look at square waves on a 'scope (or any other signal that isn't a sine wave!).

« Last Edit: September 10, 2015, 05:43:34 pm by Fungus »
 

Offline CatalinaWOW

  • Super Contributor
  • ***
  • Posts: 4188
  • Country: us
Re: Yet another scope question: DS1054Z + 45MHz SPI
« Reply #8 on: September 10, 2015, 05:52:55 pm »
The scope will just tell you "your SI sucks".

("Signal Integrity")

Yes, the DS1054Z will let you see any major faults and tell you if it's a complete trainwreck. That *might* be enough to get it working even if it still doesn't have perfect signals

There's no guarantees though. A 200+MHz 'scope is a safer bet.

nb. 200MHz is the minimum I'd consider for this - square waves have infinite bandwidth! (unlike our hardware budgets). The important thing is to know what you're looking at. Keep the harmonics thing in mind whenever you look at square waves on a 'scope (or any other signal that isn't a sine wave!).

Square waves have infinite bandwidth.  Which is why they don't exist in real life.  The trick with SI is get signals that cleanly and repeatably cross the detection thresholds in your system.  The higher bandwidth you can observe with, the more likely you will be able to find any culprits that leave ledges, dips and other gremlins around the threshold.  But there is never any benefit to having significantly (say a factor of two to four) more observation bandwidth than the limiting bandwidth in your system.  And that is where the fun is.  That limiting bandwidth is seldom known or understood, unless specifically designed in. 
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 14182
  • Country: gb
    • Having fun doing more, with less
Re: Yet another scope question: DS1054Z + 45MHz SPI
« Reply #9 on: September 10, 2015, 06:02:32 pm »
Since you state that the problem depends on the "frequency" of the SPI bus, I would guess you have a signal integrity (SI) problem. Assuming that's the case...

The SI problem will manifest itself on the edges of digital signals, in the form of ringing, undershoots and overshoots. Those will be constant whatever the bit/baud rate, but if the bit/baud rate is slow enough the transients will have died out before the data is "sampled" by the receiving flip flop.

If you don't have a scope then, looking at your picture (thanks!), I would suggest you take standard precautions to preserve signal fidelity. Principally they are: terminate long lines with the appropriate resistors, ensure there is a ground path near each signal path (especially between boards), use twisted pairs between boards, ensure there are sufficient grounds and decoupling that ground bounce isn't an issue. Those are all absolutely standard precautions which can be found in many many publications.

Note that even with a "fast enough" scope, poor probe grounds will introduce transient problems. See https://entertaininghacks.wordpress.com/2015/04/23/scope-probe-accessory-improves-signal-fidelity/ and https://entertaininghacks.wordpress.com/library-2/scope-probe-reference-material/ for more information.
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline Howardlong

  • Super Contributor
  • ***
  • Posts: 5123
  • Country: gb
Re: Yet another scope question: DS1054Z + 45MHz SPI
« Reply #10 on: September 10, 2015, 09:52:51 pm »
Quick note: back in the 70s I used to fairly easily debug 4MHz Z80 busses including dynamic memory interfaces with RAS and CAS strobes down to 10ns or 20ns time difference resolution with 10MHz analogue scopes, which is roughly equivalent to the OP's requirement, plus, being a DSO, the OP has the benefit of single shot.

It was all about accepting and understanding your tool's limitations, and working with that.

What I'd have given for one shot capability in those days.

Edit to say: I am not recommending it, just that a DS1054z is better than no scope at all, and tggzzz is correct that creative probing (as I mentioned in my first response) is key.
« Last Edit: September 10, 2015, 09:57:21 pm by Howardlong »
 

Offline Mechatrommer

  • Super Contributor
  • ***
  • Posts: 10316
  • Country: my
  • reassessing directives...
Re: Yet another scope question: DS1054Z + 45MHz SPI
« Reply #11 on: September 11, 2015, 05:25:01 am »
"square wave" infinite freq is theoritical term, in reality, our square waves have limited/finite freq harmonics, RLC will dampen the theoritical nature of it, hence that depends on risetime capability of a generator. so as someone puts, you need to observe the "risetime", 10X sampling and BW during the "risetime period only" is much preferable but that can be a premium. thats why they called 1054z series a "hobbiest scope", 1GSps only able to recontruct at decent 100MHz (with its ringing and overshoot) or 10ns of risetime give or take. at 450MHz @ ~2ns of risetime it can only capture 2 points, and not much you can see SI wise with that even if the scope BW permits. i fully agree with tggzz, without proper dso with eye pattern display, you need to take measure in every possible aspects to solve the SI problem, down to the bare metal and pure imagination.
It's extremely difficult to start life.. one features of nature.. physical laws are mathematical theory of great beauty... You may wonder Why? our knowledge shows that nature is so constructed. We simply have to accept it. One could describe the situation by saying that... (Paul Dirac)
 

Offline tggzzz

  • Super Contributor
  • ***
  • Posts: 14182
  • Country: gb
    • Having fun doing more, with less
Re: Yet another scope question: DS1054Z + 45MHz SPI
« Reply #12 on: September 11, 2015, 07:37:44 am »
"square wave" infinite freq is theoritical term, in reality, our square waves have limited/finite freq harmonics, RLC will dampen the theoritical nature of it, hence that depends on risetime capability of a generator. so as someone puts, you need to observe the "risetime", 10X sampling and BW during the "risetime period only" is much preferable but that can be a premium. thats why they called 1054z series a "hobbiest scope", 1GSps only able to recontruct at decent 100MHz (with its ringing and overshoot) or 10ns of risetime give or take. at 450MHz @ ~2ns of risetime it can only capture 2 points, and not much you can see SI wise with that even if the scope BW permits. i fully agree with tggzz, without proper dso with eye pattern display, you need to take measure in every possible aspects to solve the SI problem, down to the bare metal and pure imagination.

Yes. As I point out to the less experienced, with any digitising scope you should ignore the samples/sec marketing fluff, and concentrate on the analogue bandwidth. One of my favourite scopes was the HP54110, which was a 1GHz 25MS/scope and very good for examining edges that were "40* its sampling frequency" (ahem).
There are lies, damned lies, statistics - and ADC/DAC specs.
Glider pilot's aphorism: "there is no substitute for span". Retort: "There is a substitute: skill+imagination. But you can buy span".
Having fun doing more, with less
 

Offline rf-loop

  • Super Contributor
  • ***
  • Posts: 3608
  • Country: cn
  • Born in Finland with DLL21 in hand
Re: Yet another scope question: DS1054Z + 45MHz SPI
« Reply #13 on: September 11, 2015, 07:51:45 am »
with any digitising scope you should ignore the samples/sec marketing fluff, and concentrate on the analogue bandwidth.

Amen. :-DD

If practice and theory is not equal it tells that used application of theory is wrong or the theory itself is wrong.
-
Huawei HarmonyOS 2.0  |  ArcFox Alpha S
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf