element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum Minimum spec oscilloscope for rpi spi
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 20 replies
  • Answers 7 answers
  • Subscribers 667 subscribers
  • Views 3028 views
  • Users 0 members are here
  • spi
  • oscilloscope
  • raspberry_pi
  • raspberry pi
Related

Minimum spec oscilloscope for rpi spi

Former Member
Former Member over 9 years ago

Hey,

I'm fairly new to the electronics scene and was wondering what the minimum specs for an oscilloscope would be if i needed to look at raspberry pi spi transactions?

thanks.

  • Sign in to reply
  • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 9 years ago

    As SPI is only upto about 125MBits on the PI but typically way slower, then a 100Mhz scope should work, but if your coding it then you can select a slower SPI speed and therefor use a lower bandwidth scope. It depends what your trying to look at, if it is the actual waveforms then you will need 100Mhz min. If it is actually to protocol decode it and verify the operation then a logic analyzer may be more effective. the reason I say this is because at 100Mhz, if your trying to look at the waveform you will need probably nearer a 500Mhz scope in order to see the rising and falling edge speeds more accuratly, a 100Mhz scope looking at a 100Mhz square wave will show an attenuated sine wave due to being at the limits of the scopes bandwidth and the edges of a 100Mhz square wave is way faster than 100Mhz, even a 500Mhz scope will show some rounding of the edges

     

    Do you know the speed of the SPI but in your instance ??

     

    another option if it is a SPI bus your looking at is a Logic Analyzer like a Saleae or similar like a bus pirate

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • michaelkellett
    0 michaelkellett over 9 years ago

    It depends on how fast you will crank the SPI clock - I'm not an RPi expert but a quick web search suggests it can do at least 32MHz clock but a lot of the time you wouldn't go this fast.

    To see logic states on the SPI you need a scope with 4x the clock bandwidth and to do signal integrity at least 10x the bandwidth an at least 20x the sample rate.

    But a basic scope isn't  a lot of help with spi - what you really need is a logic analyzer - which you could buy stand alone (cheapish) or as part of  a mixed signal scope  - lots more money.

     

    Some of the nicer scopes offer SPI decoding (usually as  a paid for extra) and with a 4 channel scope this can be pretty good.

     

    You can also get SPI only analyzers and this can be very cheap (compared with scopes) but is much more limited.

     

    I can't advise anything specific without knowing your budget and  a bit more about what your need to do - mostly people expect a scope to do lots of things so if you can define some of the other things you would like it to do that would help.

     

    MK

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Problemchild
    0 Problemchild over 9 years ago

    I would suggest that since in this instance you are looking to track digital signals you may want to look at something like the Saleae logic 8/16 port Analysers which you can get clones of for a few pounds. I have several and they work very well they should be good for a few megs therefore OK for most SPI traffic if not at the ultimate speed. (Yes you can always get faster ones). Scope wise you could do much worse than the RIGOL1054Z which can also do serial logic decode at around 280 ish £

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Problemchild
    0 Problemchild over 9 years ago in reply to michaelkellett

    Yeah the problem is that been new he doesn't know what he needs and no doubt will get conflicting advice. I suggested the cheap logic analysers since they are far from perfect they do represent good effective value and not a money to kick out doing most things OK. That way he can learn exactly what he wants and still have plenty of toy budget for the next thing image

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago

    Thanks guys!

    I will be looking a logic analyzers now. Seems like a super useful piece of equipment. the raspberry pi spi speeds seem to be somewhat ambiguous and looking at the source code of what I'm trying to analyze, the spi speed is set to the max allowed by the driver which is 125Mhz, but from what I've read, it never actually reaches that speed, so we'll see.

    Thanks again. super helpful

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Robert Peter Oakes
    0 Robert Peter Oakes over 9 years ago in reply to Former Member

    There is a difference between Data Rate and Bit Rate, you can crank the bit rate upto the 125Mhz and it probably does exit the PI at that speed but only for that byte of data, the time it takes the code to loop around and grab the next piece of data will slow down the overall rate considerably resulting in considerable degration in overall datarate resulting in the figures arround 10 or 20Mhz, this actual result may depend on the activity the pi is doing during the transfer

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Reject Answer
    • Cancel
  • Former Member
    0 Former Member over 9 years ago

    I did not notice an answer that suggested a storage scope.  Often a SPI message stream does not repeat and you want to trigger and capture the one occurrence.  The logic analyzer is great if you do not need to correlate the SPI timing with some other event.  An oscilloscope does provide a tool that has many signal analysis uses besides SPI.  A storage scope will be digital and should have a sample rate over 250 Megasamples/sec to monitor SPI and other computer related signals.  As others have said here, you need several times the sampling rate of the signal being analyzed.

     

    It is great to have nice tools if you can afford it.  Electronics and computers keep getting more powerful and cheaper as time goes on.  So does powerful electronic test equipment.  My LeCroy 4ch, 4 Gigasample, multi-color scope was built in 1992 for about $10,000.  I bought it on eBay for $1,500.00.  It even does FFT spectrum analysis (nice).

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • rew
    0 rew over 9 years ago in reply to Robert Peter Oakes

    Those Saleae clones will sample up to 24MHz. This means that if you set the SPI clock above 12MHz, you'll miss data.

     

    If the bit rate is 125MHz, you need something that can sample at at least 250MHz.

     

    Note:  The 125MHz number sounds fishy: IO pins on the 'pi are not usually capable of speeds beyond about 50MHz. You'd have to take "extra care" in routing the signals, differential pairs etc etc. This is not the case for the SPI signals routed to the GPIO connector.

     

    On another note: If you set the bit rate at 125MHz, the raspberry pi will be able to sustain that for a while. The raspberry pi is able to feed the SPI module with DMA, and doing 15Mbyte per second is easily achieved by the DMA module. 

     

    If  you're having trouble with some SPI things, I'd first reduce the clock rate below 125MHz. See if that helps.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Problemchild
    0 Problemchild over 9 years ago in reply to rew

    Question is who has the SPI bus wound up that fast?

    Most parts will only do a few megs and therefore the cheap Saeleae stuff will be more than good enough.

    Also I would say that choosing a clock divider on the SPI that was fast enough but not too fast would make a more reliable solution in terms of ease of design and signal integrity.

     

    The RPF documentation on SPI is quite useful as well

    https://www.raspberrypi.org/documentation/hardware/raspberrypi/spi/README.md

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Problemchild
    0 Problemchild over 9 years ago in reply to Former Member

    The RIGOL 1084Z was a storage scope! image

     

    As the chap in question is brand new to the game I thought I would avoid references to posh kit as these are special purchases and ideally you need to know what you want before you buy and you certainly don't want to pay the new price !! I too have a 10K scope but damned if I would pay 10K for it ... It's like recommending a Porsche  to a learner driver when a mini might be more appropriate.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube