How do I capture the first message a device sends on power up ? (MSO5000)  - Page 1
Forum section: electronics / general

author: LinuxGuy123
author_rank: Regular Contributor
timestamp: February 13, 2025, 10:09:37 pm
content: 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/f1zIIubHow can I have the scope ignore the noise on startup and trigger on the real data ?BTW, I love this scope.

author: thm_w
author_rank: Super Contributor
timestamp: February 13, 2025, 10:55:41 pm
content: 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.

author: Smokey
author_rank: Super Contributor
timestamp: February 13, 2025, 11:08:01 pm
content: Quote from: thm_w on February 13, 2025, 10:55:41 pmya, 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.

author: RoGeorge
author_rank: Super Contributor
timestamp: February 13, 2025, 11:30:28 pm
content: 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 mightthishard to catch:

author: artag
author_rank: Super Contributor
timestamp: February 14, 2025, 11:30:30 am
content: 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

author: tggzzz
author_rank: Super Contributor
timestamp: February 14, 2025, 12:04:17 pm
content: Quote from: LinuxGuy123 on February 13, 2025, 10:09:37 pmScopes are not the onlyfruittest equipment.If you want to capture and analyse adigital domainsignal/message, usedigital domain toolssuch 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.

author: MathWizard
author_rank: Super Contributor
timestamp: February 21, 2025, 08:44:03 am
content: 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.