Author Topic: How do I capture the first message a device sends on power up ? (MSO5000)  (Read 1685 times)

0 Members and 1 Guest are viewing this topic.

Offline LinuxGuy123Topic starter

  • Regular Contributor
  • *
  • Posts: 59
  • Country: ca
Not sure if this post should be in the Microcontroller forum or the Test Equipment forum...

I need to capture the first message a device sends on the SPI bus on power up.  I have a Rigol MSO5000 connected to CLK, data and C/S.

The problem is that there is noise on the signals when the device starts and my scope is triggering on the noise and not waiting to see real data. 

https://imgur.com/a/f1zIIub

How can I have the scope ignore the noise on startup and trigger on the real data ?

BTW, I love this scope.

« Last Edit: February 13, 2025, 10:23:29 pm by LinuxGuy123 »
 

Offline thm_w

  • Super Contributor
  • ***
  • Posts: 8002
  • Country: ca
  • Non-expert
Maybe a problem with your probing (long ground leads, coupling to something), if you can improve that the noise could go away.

Or change the trigger type to something that ignores the small spikes. Slope trigger, duration trigger, etc.
Turn noise reject on as well.
Profile -> Modify profile -> Look and Layout ->  Don't show users' signatures
 

Offline Smokey

  • Super Contributor
  • ***
  • Posts: 3290
  • Country: us
  • Not An Expert
Maybe a problem with your probing (long ground leads, coupling to something), if you can improve that the noise could go away.

Or change the trigger type to something that ignores the small spikes. Slope trigger, duration trigger, etc.
Turn noise reject on as well.

ya, and turn on bandwidth limit on the scope.

It might be that the SPI pins are coming up as inputs and are high impedance at boot.  If this is the case, add a high resistance pulldown on the lines, like 100K or something.  That will hold the lines down while they are high impedance.
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 7245
  • Country: ro
The oscilloscope is capable to trigger on SPI.  If you don't have that trigger option, unlock your scope to add the missing trigger options.  If not possible, see if you have any delay/hold off option.  If not, set the maximum memory for samples at a reasonably slow sampling time, in the hope that you will catch the start of communication, too, after the noises fake trigger.

If not, make a variable RC delay from power up (in hardware) and trigger on that.

If all else fail, try to manually press the force trigger at just the right moment, though that might this hard to catch:


 ;D

Offline artag

  • Super Contributor
  • ***
  • Posts: 1342
  • Country: gb
Trigger on reset rather than the SPI signals, then force a reset if the equipment doesn't do it externally. This should give a shorter time (and therefore less capture memory) than triggering on power up. It might still take too long.

Alternatively, use a logic analyser (perhaps one of the super-cheap USB ones) to capture a much longer trace.

I think the scope has the ability to trigger on duration, such that you require the clock signal to be high for a minimum time. This can be a more specific requirement than just using an analog trigger filter. There's also a pattern filter if you have the logic analyser module. You can require that power is high, reset inactive before triggering on an edge of CS or clock
« Last Edit: February 14, 2025, 12:00:38 pm by artag »
 

Online tggzzz

  • Super Contributor
  • ***
  • Posts: 22043
  • Country: gb
  • Numbers, not adjectives
    • Having fun doing more, with less
I need to capture the first message a device sends on the SPI bus on power up.  I have a Rigol MSO5000 connected to CLK, data and C/S.
..
BTW, I love this scope.

Scopes are not the only fruit test equipment.

If you want to capture and analyse a digital domain signal/message, use digital domain tools such as logic analysers (signals), protocol analysers (message), and printf() (significance). There is overlap between the price and capability of those three. All have the major advantage that they allow you to ignore irrelevant stuff and concentrate on the information.

Basic logic analysers can be very cheap, with the decoding done in a PC application.

A BusPirate5 should be considered for capturing messages. It can also generate messages, which might be useful.

Or it may be that you can make effective use of signals for triggering plus the scopes triggering facilities; RTFM, since all scopes are different.
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 MathWizard

  • Super Contributor
  • ***
  • Posts: 1857
  • Country: ca
What about sequence mode triggering ? I haven't tried it yet, but I think it stores a screen capture for each triggering event. Isn't it like taking a bunch of single captures and storing each one, at least until the memory fills up. IDK if that would get past the noise tho.

I need to try that myself on a few signals, and see what happens. For a clean signal, like say a 1kHz square wave, that also turns on/off at say 10Hz, I thinking in sequence mode, I could set the timebase to see the 1kHz easily, and end up with a sequence of screen captures, that doesn't have the long off times from 10Hz modulation.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf