EEVblog Electronics Community Forum

Products => Test Equipment => Topic started by: KD0RC on March 15, 2014, 04:28:27 am

Title: Agilent 2000x UART decode
Post by: KD0RC on March 15, 2014, 04:28:27 am
I have the UART decode function working on my Agilent 2022, but I can only capture RX or TX at any given time.  Is there a way to get it to trigger on TX Start AND RX Start at the same time?  I have seen a demo video where TX and RX are interleaved ('Agilent MSO RRR #1' or something close to that...) where the words alternate between TX and RX.  Does anyone know how to trigger it so that I can get both without resetting the trigger?
Title: Re: Agilent 2000x UART decode
Post by: KD0RC on March 15, 2014, 05:04:22 am
Nevermind...  I figured it out.  I needed to set the trigger type to Pattern and set Channel 1 to Pattern = 1 and Channel 2 to Pattern = 1.  The possible patterns are 0, 1, Don't Care, Rising Edge and Falling Edge.  I am not quite sure what a 0 or 1 pattern are, but blind luck in trying every combination got me to a point that it works.
Title: Re: Agilent 2000x UART decode
Post by: alex.forencich on March 17, 2014, 05:53:08 am
I believe the 'pattern' trigger is just a high/low qualifier if you don't specify any rising/falling settings.  If you set channel 1 to 1 and channel 2 to 1, then it will trigger when both channel 1 and channel 2 are above the thresholds for those channels. 
Title: Re: Agilent 2000x UART decode
Post by: KD0RC on March 18, 2014, 01:44:09 am
Hi Alex, Yes I think that is right.  I turned on the training signals and see that you cannot select both channels to rising or falling. If one is rising or falling, the other is automatically set to Don't Care.  If you choose the 1 or 0 pattern, you can set both channels.  In my circuit (115.2 Kbs) I need to set both to 1 to trigger it and see both sides of the conversation.  In the training signals, I can set one to rising or falling and the other to Don't Care and it tiggers on everything.  In the training Sigs it also triggers on a trigger type of UART, not just on Pattern and still gets both sides (RX and TX).  The training sigs repeat on a regular basis, so that is my guess as to why the triggering is more forgiving than my real world set up.

On the bright side, I am discovering that several assumptions of the timing of my circuit were way off, so I can start fixing the firmware in a meaningful way now...
Title: Re: Agilent 2000x UART decode
Post by: alex.forencich on March 18, 2014, 04:18:56 am
If you want to do edge triggering, perhaps a rising edge on one qualified by a high level on the other would be a good idea.  It's not really possible to trigger on two simultaneous rising edges because it's next to impossible to get two rising edges at exactly the same time. 

Why do you need to trigger on simultaneous RX and TX start, by the way?  That seems to be a rather odd trigger condition. 
Title: Re: Agilent 2000x UART decode
Post by: KD0RC on March 19, 2014, 01:38:24 am
If I only trigger on TX or RX, the other does not decode or stand still.  I am looking for the RX response to the TX stimulus so that I can understand the timing between the two.  By using the pattern trigger, I get both TX and RX to stand still for the picture, regardless of the goofy time delays my firmware and host software have introduced. 

I have never had so much capability in a scope before, and I am constantly amazed at how much I did not understand about my circuits and FW...  I wish I had this a few years ago when I built an interface from a ham radio to an automatic antenna switching box.  Took me quite a while to get all of the serial bits right - UART decode on a scope would have gotten me to the right answer in minutes!
Title: Re: Agilent 2000x UART decode
Post by: alex.forencich on March 19, 2014, 01:50:40 am
Hmm, that sounds like something I would probably throw segmented memory at.  There are probably several different ways to try to capture the same waveform.  The serial decode is definitely one of the most useful features of these scopes, and Agilent really does it right by doing it in hardware.  I borrowed a Tek MSO several years ago to debug a board I was putting together, but the serial decode was so slow it was practically unusable outside of single-shot mode, especially with deep memory enabled. 

If you use one of the Infiniium class scopes (we have a 91304 in the lab), the triggering options are even more fun.  You can add a qualifier so the scope will only accept a trigger if one channel is in a particular state, and you can also sequence two triggers with an optional delay so you can wait for an event on one channel before actually triggering on a different channel.  Those units can also decode USB 3 and 1G and 10G ethernet, but it's all in software due to the data rate.