Beyond Edge Triggering: How to Debug with Oscilloscope Triggers

Publisher:小星星龙猫Latest update time:2011-10-26 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Introduction

The oscilloscope is a fundamental instrument for electrical engineers, but I often find that some engineers fail to use its triggering function effectively. Triggering is often considered to be very complex, and there is a tendency to go directly to the lab and ask an expert to help set up the trigger if there are any questions. The purpose of this article is to help engineers understand the basic principles of triggering and strategies for using triggering effectively.

What is a trigger?

Any oscilloscope has limited memory, so all oscilloscopes must use triggers. A trigger is an event of interest that the oscilloscope should find. In other words, it is something that the user wants to find in the waveform. A trigger can be an event (i.e., a problem in the waveform), but not all triggers are events. Examples of triggers include edge triggers, glitch signal triggers, and digital pattern triggers.

The reason oscilloscopes must use triggers is that they have limited memory. For example, the Agilent 90000 Series oscilloscopes have a memory depth of 2 billion samples. However, even with such a large memory, the oscilloscope still needs some events to distinguish which of the 2 billion samples it needs to display to the user. Although 2 billion samples may sound like a lot, it is still not enough to ensure that the oscilloscope memory can capture the event of interest.

The memory of an oscilloscope can be thought of as a conveyor belt. Whenever a new sample is taken, it is stored in memory. When memory is full, the oldest samples are deleted to allow the newest samples to be stored. When a trigger event occurs, the oscilloscope captures enough samples to store the trigger event in the required location in memory (usually in the middle), and then displays this data to the user.

Repeated sampling mode and single sampling mode

In the past, the most common mode in which an oscilloscope operated was in repetitive mode. This meant that once the oscilloscope triggered and displayed data to the user, it would immediately begin searching for the next trigger event. This is why oscilloscope waveforms update so frequently.

Any oscilloscope needs time to re-arm the trigger in order to trigger and display data to the user. This time is also called "hang time". During the hang time, the oscilloscope cannot capture any waveform. Therefore, the shorter the hang time, the fewer events will be missed. For example, if a glitch signal happens to appear during the hang time, it will not be displayed on the oscilloscope's display. If this glitch signal is a rare event, the user may think that there is no glitch signal in the waveform, but in fact it is. Therefore, the shorter the hang time of the oscilloscope, the lower the probability of missing important events in the waveform.

Another way to express this concept is the “update rate”, which is the number of waveforms per second. For example, the Agilent 7000 Series oscilloscope has an update rate of 100,000 waveforms per second.

The single sampling mode is used to find a single trigger without continuing to acquire more waveforms. Therefore, when the user wants to find a certain event, check the cause of the event and the problem that occurred after the event, the single sampling mode can be used. This mode is especially important for analyzing waveforms that are not repeated and change with each operation.

Automatic mode and trigger mode

What happens if no trigger event occurs? This is a very good question. In this case, the waveform on the screen will not update. This is not what we want because the user may not know how to change the trigger to get the waveform on the screen. For example, if the probe slips off, the oscilloscope will stop triggering. However, if the screen does not update, the loss of signal will not be obvious.

To solve this problem, oscilloscopes have a mode called "Auto" triggering. In this mode, if a trigger cannot be found within a period of time, the oscilloscope will automatically trigger to update the screen. Usually, there is some indicator on the oscilloscope (such as an LED on the front panel) to indicate whether the last trigger was a real trigger or an automatic trigger. This way, if the user sees the "Auto" indicator, they will know that the trigger they set did not occur. For example, if the user set the trigger to be a glitch signal, they will know that the oscilloscope did not detect the glitch signal.

However, as you will recall from the previous paragraph, when auto-triggering occurs, it means that after each trigger, there is a hang time while the oscilloscope re-arms. To avoid this time entirely, the oscilloscope should be changed to "triggered" mode. (This is called "normal" mode on some oscilloscopes.) In "triggered" mode, the oscilloscope will not trigger unless a trigger event is found. Therefore, if the user sets the trigger mode to glitch and the oscilloscope never triggers, the user can be confident that the glitch did not occur (at least as far as the oscilloscope can detect).

Normal trigger mode

Edge trigger

Edge triggering is the most common trigger of all trigger modes. The reason why it is used so frequently is that all waveforms have edges, and as long as the trigger level is set correctly, this trigger mode can work properly. At the same time, this advantage is also its biggest disadvantage, because it can trigger very frequently on most waveforms, so it is very similar to Auto Trigger.

Glitch signal/pulse width/timeout trigger

While many problems can be easily found using just an edge trigger, sometimes engineers must use more complex triggers. The simplest of these is the pulse trigger. A pulse trigger is defined as a period of time above (positive pulse) or below (negative pulse) a threshold level. The most common pulse trigger is the glitch trigger, which is often used to trigger on pulses that are less than a minimum width. This is an example of a trigger violation because the oscilloscope will indicate a problem whenever it triggers.

One confusing aspect of pulse width triggering with a maximum time value is the time at which the trigger occurs. In some cases, the user may want the oscilloscope to trigger immediately when the time value is exceeded. This is called a "timeout" trigger because the oscilloscope does not require a complete pulse to trigger. In other words, the timeout trigger will occur even if the second transition does not occur. [page]

In contrast, what we call a "pulse" trigger will not trigger until the second jump occurs. That is, for a positive pulse, even if the maximum time is exceeded, it will not trigger until the falling edge. This means that triggering after the time limit point can be performed well. Therefore, the usage rate of timeout triggering is much higher than that of pulse width triggering. Since this is not intuitive, we provide users with two options, users can use timeout triggering or pulse end triggering. If the timeout option is selected, the pulse width trigger at this time will be exactly the same as the timeout trigger.

Another confusing thing about pulse width triggers is that they are not all trigger violations. While a glitch is clearly a trigger violation, a long pulse can also be a normal event. So it depends on whether the pulse width is specified as a condition for a trigger violation.

Rise time and fall time

The next type of violation trigger is the rise time trigger and the fall time trigger. They can be used to find edges that rise or fall too fast or too slow. This type of trigger is defined by two trigger levels (logic high and logic low) and the maximum and minimum time the signal can be between these two levels.

One confusing aspect of rise time triggering and fall time triggering is that the trigger voltage thresholds are not dependent on the automatic measurement voltage thresholds. For example, it would be normal to measure the rise time of a signal and expect the rise time trigger to trigger on the same time value. However, in many cases, the measurement thresholds default to 10% and 90% of the signal voltage range. Because the trigger thresholds are independent, it is easy for the user to mistakenly set different thresholds, such as 5% and 95%. In this case, the user may be confused because the measurement shows a rise time value, but using the same time value does not cause the oscilloscope to trigger.

Setup and hold trigger

Another type of violation trigger is setup and hold trigger. Of course, this requires the use of data signals and clock signals. This trigger also requires the specification of setup time, hold time, or both. When the setup and hold time violation trigger conditions are detected, the oscilloscope will trigger.

Runt Pulse Trigger

A glitch is a very narrow pulse, while a runt pulse is a very runt pulse. A runt pulse is defined by three voltage levels. A runt trigger occurs if a signal passes through two thresholds (in the same direction), then passes through one of the thresholds again without passing through the third threshold. For example, if the three thresholds are 1V, 2V, and 3V, and the signal goes from 0V to 2.3V and then back to 0V, this is a runt pulse because it passes through 1V, 2V on its rise, and then 2V on its fall.

The most confusing part of this trigger is the definition of the three threshold levels. Usually, the threshold levels are defined as 10%, 50%, and 90% which is just fine, but it is not intuitive, why do we need three threshold levels instead of just two?

Window Trigger

Window trigger is an advanced trigger that uses two voltage thresholds and two time values. Window trigger is triggered when the signal enters or exits a certain voltage range. In addition, time can also be a range, so you can specify the minimum and maximum time that the signal is within (or outside) a certain voltage range as the trigger condition. This provides great flexibility for performing a variety of different triggers.

Sequence trigger

Sequence triggering provides the ability to first look for one event and then search for another event before the oscilloscope triggers. For example, sequence triggering allows the user to look for a signal edge that is immediately followed by another signal pulse.

An example of sequence triggering on an Agilent 90000 oscilloscope is shown in Figure 1. Note how the pulse on channel 2 follows the edge on channel 1.


Figure 1: Sequence triggering.

Software trigger

[page]

The most common trigger in an oscilloscope is the hardware trigger. In this case, because the trigger is processed in real time, even the rarest trigger events can be captured. However, some events are so complex that the hardware trigger cannot capture them. To trigger on these events, a software trigger (such as InfiniiScan on Agilent Infiniuum oscilloscopes) is used together with the hardware trigger. When the hardware trigger is in place, the software trigger searches for the captured event trace. If it finds this trace, the oscilloscope triggers. However, while this type of trigger is powerful, it does not trigger in real time. This is fine for events that occur frequently, but it is a huge drawback for rare events. In this case, the software trigger will likely miss most instances of the rare event, and the oscilloscope may take a long time to trigger. Even so, it is much better to let the oscilloscope automatically find the event, even if it takes several minutes, but it is better than not finding any event at all.

Triggering strategy

Trigger to display waveform

This is by far the simplest case because it uses the automatic trigger. The easiest way to set this trigger is to simply press the "Autoscale" button on the front panel of the oscilloscope. This is the quickest way to display the oscilloscope waveform. In many cases, this is enough to give the user an idea of ​​what is happening next.

Triggering to debug simulation issues

If simple triggering does not reveal the problem, the next approach is to look for simple analog problems. The main trigger modes to try here are Glitch, Runt, Rise Time, and Fall Time. These modes reveal the most common analog problems. Alternatively, you can use setup and hold triggering to ensure that setup and hold triggering is not the source of the problem.

In this case, the oscilloscope should be run using the standard repeatable mode. (For most oscilloscopes this is simply called "Run").

Some analog problems, such as non-monotonic edges, can only be detected using software triggering. In this case, make sure that the hardware trigger and software trigger are set to the same edge and slope. This is a very common problem that fools the user into thinking that no trigger occurred, when in fact the hardware trigger is set incorrectly.

If you notice that the waveform is displayed on the oscilloscope for a very short time, you can use the zone trigger in the software trigger to trigger it. Zone triggering allows us to specify a portion of the grid lines as a "must cross" area, and the oscilloscope will trigger only when the waveform passes through that area. Alternatively, this area can also be set to "must not cross" to filter out waveforms you don't want to see.

In this case, it is wise to set the oscilloscope to a triggered mode so that it does not trigger when no event is found. This also means that this particular problem is not occurring and this problem can be eliminated as the source of the problem. So, it is a process of troubleshooting.

Triggering to debug software or FPGA issues

In the first two cases, the oscilloscope is triggering on a specific analog problem. However, in many cases (such as software or FPGA problems), the goal is not to trigger on the problem, but simply to try to find the logic problem rather than the analog problem by tracking the waveform.

In this case, it is important to set up the oscilloscope to run in deep memory and single-shot mode. (For Agilent oscilloscopes, this is the "Single" button, not the "Run" button.) Deep memory gives you the maximum number of waveforms, which also give you the best chance of capturing the problem. For most oscilloscopes, the memory depth is set automatically whenever the "Time per Division" knob is changed, but it can also be set manually. For Agilent Infiniium oscilloscopes, this is done in the "Acquisition" menu.

The trigger event should be set to a known event that occurs somewhere in the area of ​​interest. The most common options are pulse, digital pattern, and serial triggering. Pulse triggering is the simplest trigger because it only requires the pulse length to be specified. Pattern triggering and serial triggering are very special because they allow the user to specify specific values. For example, a common serial trigger is a write to a specific address. Once the event of interest is found, tracing this trace will lead to the source of the problem. For serial buses, it is very useful to enable serial decoding of the data. This not only displays the analog waveform, but also converts the waveform into packets, making it very easy to trace through the data.

Summarize

Triggering is a very powerful oscilloscope feature, but often the user must go beyond simple edge triggering. The key is to understand whether the user is looking for an analog problem or tracking down a logic problem. Oscilloscopes can provide excellent capabilities in both areas, but it depends on the user using the right strategy.

Reference address:Beyond Edge Triggering: How to Debug with Oscilloscope Triggers

Previous article:Design of an Ultra-Wide Pulse Generator
Next article:Waveform Digitizers in Automatic Test Systems

Latest Test Measurement Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号