Author Topic: Capture 2 minutes SPI traffic and save it  (Read 707 times)

0 Members and 1 Guest are viewing this topic.

Offline pilot5599Topic starter

  • Newbie
  • Posts: 2
  • Country: ca
Capture 2 minutes SPI traffic and save it
« on: June 24, 2024, 11:53:33 pm »
Hello,

I have a Rigol MSO5204 oscilloscope. I'm trying to figure out if it's possible to capture a 2 minutes SPI trffic and save it to the USB drive. Or the capture can be saved to Windows?
I managed to connect the scope to my Windows via LAN. I'm able to do remote control from the web browser in my Windows. But I don't know if it's possible to save a relative long period of captures directly to Windows. I tried the USB drive. But it can save the current screen.

I understand I can decode those 4 analog channels. If I connect my device via the digial channels to the scope. Can I decode those digital channels?

Thanks in advance!
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 6624
  • Country: ca
  • Non-expert
Re: Capture 2 minutes SPI traffic and save it
« Reply #1 on: June 25, 2024, 12:05:20 am »
Its much easier to do this with a $10 sigrok USB logic analyzer. Depending on the speed of your SPI bus.

Yes you can decode on either the analog or digital inputs.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline Someone

  • Super Contributor
  • ***
  • Posts: 4663
  • Country: au
    • send complaints here
Re: Capture 2 minutes SPI traffic and save it
« Reply #2 on: June 25, 2024, 12:16:08 am »
I have a Rigol MSO5204 oscilloscope. I'm trying to figure out if it's possible to capture a 2 minutes SPI trffic and save it to the USB drive. Or the capture can be saved to Windows?
I managed to connect the scope to my Windows via LAN. I'm able to do remote control from the web browser in my Windows. But I don't know if it's possible to save a relative long period of captures directly to Windows. I tried the USB drive. But it can save the current screen.
Scope has 200Mpts of memory, can capture >2min at 1M sample per second.

Where is the problem?
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 6624
  • Country: ca
  • Non-expert
Re: Capture 2 minutes SPI traffic and save it
« Reply #3 on: June 25, 2024, 01:20:45 am »
OP says they are only getting the current screen data, so maybe the file format or settings they use to export are incorrect.
Either way its a bit of a hassle, as mentioned here:
https://www.eevblog.com/forum/testgear/rigol-mso5000-unrecorded-memory-garbage/
https://github.com/ngscopeclient/scopehal-apps/issues/287
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 
The following users thanked this post: Electro Fan

Offline dietert1

  • Super Contributor
  • ***
  • Posts: 2202
  • Country: br
    • CADT Homepage
Re: Capture 2 minutes SPI traffic and save it
« Reply #4 on: June 25, 2024, 10:11:31 am »
I would try a STM32 nucleo board with 2 SPIs to sniff transactions on both MOSI and MISO and send it to a windows or linux host via USB continuously. Everybody uses what they are familiar with.

Regards, Dieter
 

Offline TizianoHV

  • Regular Contributor
  • *
  • Posts: 100
  • Country: it
    • My Website
Re: Capture 2 minutes SPI traffic and save it
« Reply #5 on: June 26, 2024, 05:42:49 am »
+1 for sigrok, it is easy to use and you can save directly logs to your pc and review them later.

Offline tooki

  • Super Contributor
  • ***
  • Posts: 11978
  • Country: ch
Re: Capture 2 minutes SPI traffic and save it
« Reply #6 on: June 26, 2024, 07:02:56 am »
Another useful tool, if one does SPI/I2C bus debugging a lot and can afford it, is a tool like the Aardvark, whose software is designed around bus debugging. In particular, compared to a pure logic analyzer, you can also write things to the bus as needed. But there are many, many ways to skin this cat, including DIY solutions like the Nucleo board dieter1 mentions (or any other fast MCU with enough buses for your situation).
 

Offline nctnico

  • Super Contributor
  • ***
  • Posts: 27283
  • Country: nl
    • NCT Developments
Re: Capture 2 minutes SPI traffic and save it
« Reply #7 on: June 26, 2024, 07:38:27 am »
I have a Rigol MSO5204 oscilloscope. I'm trying to figure out if it's possible to capture a 2 minutes SPI trffic and save it to the USB drive. Or the capture can be saved to Windows?
I managed to connect the scope to my Windows via LAN. I'm able to do remote control from the web browser in my Windows. But I don't know if it's possible to save a relative long period of captures directly to Windows. I tried the USB drive. But it can save the current screen.
Scope has 200Mpts of memory, can capture >2min at 1M sample per second.

Where is the problem?
The problem is decoding only what is on screen instead of full memory. Then the question is how many SPI messages need to be captured; the number of decoded messages is typically limited as well. Last but not least, 1MS/s may not be enough. OTOH, if there is a lot of dead time between the SPI messages, segmented recording can be an option and requesting each (decoded) segment through a piece of software (Python script).
« Last Edit: June 26, 2024, 07:56:57 am by nctnico »
There are small lies, big lies and then there is what is on the screen of your oscilloscope.
 
The following users thanked this post: egonotto

Offline Someone

  • Super Contributor
  • ***
  • Posts: 4663
  • Country: au
    • send complaints here
Re: Capture 2 minutes SPI traffic and save it
« Reply #8 on: June 26, 2024, 09:39:37 am »
I have a Rigol MSO5204 oscilloscope. I'm trying to figure out if it's possible to capture a 2 minutes SPI trffic and save it to the USB drive. Or the capture can be saved to Windows?
I managed to connect the scope to my Windows via LAN. I'm able to do remote control from the web browser in my Windows. But I don't know if it's possible to save a relative long period of captures directly to Windows. I tried the USB drive. But it can save the current screen.
Scope has 200Mpts of memory, can capture >2min at 1M sample per second.

Where is the problem?
The problem is decoding only what is on screen instead of full memory. Then the question is how many SPI messages need to be captured; the number of decoded messages is typically limited as well. Last but not least, 1MS/s may not be enough. OTOH, if there is a lot of dead time between the SPI messages, segmented recording can be an option and requesting each (decoded) segment through a piece of software (Python script).
Perhaps, lots of guessing/imagination on your part. The OP needs to explain what limitations they are coming up against.

Can it record 2 minutes of data and off load that to usb or PC? yes. That was the question posed.
 
The following users thanked this post: egonotto

Offline kripton2035

  • Super Contributor
  • ***
  • Posts: 2636
  • Country: fr
    • kripton2035 schematics repository
Re: Capture 2 minutes SPI traffic and save it
« Reply #9 on: June 26, 2024, 10:07:21 am »
 

Offline dietert1

  • Super Contributor
  • ***
  • Posts: 2202
  • Country: br
    • CADT Homepage
Re: Capture 2 minutes SPI traffic and save it
« Reply #10 on: June 26, 2024, 11:04:50 am »
The scope variant will be limited to 200 MSamples. In order to log 2 minutes that is about 1 MHz sampling, which isn't good enough for most SPI. Often SPI works at clock frequencies of several MHz up to 50 MHz or so.
That's why i thought about making a SPI sniffer, that can handle those higher clock rates without producing a vast overhead.
It could use some GPIOs as inputs for the nCS signals to tag recorded SPI transactions per bus device.

Regards, Dieter
 

Offline TomKatt

  • Frequent Contributor
  • **
  • Posts: 441
  • Country: us
Re: Capture 2 minutes SPI traffic and save it
« Reply #11 on: June 26, 2024, 11:24:39 am »
The $149 DSlogic Plus LA can stream 3 channels at 100MHz (or 6 channels at 50MHz) sampling rate over usb to pc for ~160 seconds.  The $299 DSLogic U3Pro16 is USB3 and can stream 6 channels at 500MHz.  Their DSview software is based on Sigrok Pulseview and has basically the same feature set, including SPI decoding.

Depending on the task, I often switch between scope and LA for serial comms work.  The LA is great for decoding, but only the scope can identify signal issues (timing, missing or runt pulses, etc).
« Last Edit: June 26, 2024, 12:52:11 pm by TomKatt »
Several Species of Small Furry Animals Gathered Together in a Cave and Grooving with a PIC
 
The following users thanked this post: egonotto, thm_w

Offline pilot5599Topic starter

  • Newbie
  • Posts: 2
  • Country: ca
Re: Capture 2 minutes SPI traffic and save it
« Reply #12 on: June 28, 2024, 10:48:20 pm »
Thanks everyone!
I figured out the way to save the memory in csv format. I also found out how to configure the scope to decode the digital channels.
Thanks again!
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf