Continuous SPI logging with 3206 MSO

Post general discussions on using our drivers to write your own software here
Post Reply
Zabooh
Newbie
Posts: 0
Joined: Sat Jul 07, 2018 10:08 am

Continuous SPI logging with 3206 MSO

Post by Zabooh »

Hello,

Would it be possible to realize a continuous SPI logging with a 3206MSO or a similar model?
How do you get the logic analyzer channels streamed continously via USB into a PC application?
Which language is recommended. C / C ++ or Python, or ... ??

I am not interested in recording SPI transfers in sections, but in large volumes of SPI over long periods of time.

I think the USB bandwidth becomes the bottleneck.

Is a picscope suitable for this at all or are there other devices that allow such a thing?

Best Regards
Zabooh

Gerry
PICO STAFF
PICO STAFF
Posts: 1144
Joined: Mon Aug 11, 2014 11:14 am

Re: Continuous SPI logging with 3206 MSO

Post by Gerry »

Hi Zabooh,

The answer to your question ultimately depends upon how much data you need to capture at a time, and how fast. For more data than your available short term storage (RAM) at typical SPI data rates the answer is, unfortunately, no.

Our SPI decoding is only available in our PicoScope 6 Software, which is limited in terms of the maximum amount of transferable data (e.g. 100,000,000 samples for 5 peripherals). However, you can get the Digital (or as you referred to, Logic Analyzer) Channels of an MSO PicoScope continuously streamed to the PC. For streaming, limited only by the memory resources of your computer, you would need to use the Software Development Kit to develop your own SPI decoding application. The best choice of language would be one that has the best support for SPI/decoding, and/or the one that best meets your other development preferences.

So, you would have to capture the raw data (as Digital Channels), and either be, (a) decoding and acting upon the data as you're capturing it, or (b) long term storing it for later decoding and analysis after you have captured it all, or (c) short term storing it for analysis.
(a) Decoding and acting upon the data in real-time is not possible at typical SPI data rates (if you were to run the bus extremely slowly then it may be possible) .
(b) Storage to long term storage media such as a flash drive, may be fast for writing data, but the action of writing a large chunk of data, and or closing the file and returning to your algorithm to retrieve the next section of data would be too long to avoid gaps in your data.
(c) However, if you can capture all of the data that you need, just using the computers RAM, before analysis, or before long term storage, then the answer is yes.

If this will not work for you then you may find what you're looking for in a Logic Analyzer, or Protocol Analyzer that supports SPI (e.g. ones that support compression to maximize the amount of data that can be stored short-term).

Incidentally, the transfer over USB by a PC-based scope is often blamed for any bottleneck, which is not true here (with the maximum transfer rate being 125MS/s which is faster than SPI) and is not true even for displaying data, as discussed here: topic13697.html.

Regards,

Gerry
Gerry
Technical Specialist

Post Reply