Perform five common debug tasks with an oscilloscope
Testing these systems means that designers must be capable of working in a mixed domain environment, from DC to RF, with analog and digital signals, and serial and parallel buses. To meet this need, test equipment vendors are responding with integrated oscilloscopes that provide a complete set of bench instruments in a single portable package. Such oscilloscopes are capable of handling a range of common debug and verifications tasks, from detecting sources of radiated EMI to validating a switching power supply design.
In the not too distant past, making all of these measurements would have required a bench full of instruments, each with its own interface and set-up requirements. In a survey of oscilloscope users, we found that in addition to their oscilloscopes, engineers reported that they turned to the following instruments several times per month:
- Digital voltmeter: 87%
- Function generator: 68%
- Spectrum analyzer: 45%
- Logic analyzer: 33%
- Protocol analyzer: 15%
What this indicates is that the oscilloscope—the center instrument on most design benches—needs to give designers a more comprehensive set of functions and features to support efficient verification and debugging of embedded designs. As a result, test-equipment manufacturers now offer integrated oscilloscopes that combine multiple instruments that provide insight into both time and frequency domains.
In addition to all the capabilities of a digital oscilloscope, other functions found in these integrated instruments include a spectrum analyzer, a logic analyzer, a protocol analyzer, an arbitrary function generator, and a DVM (digital voltmeter). How can you use a multifunction oscilloscope to solve debug problems? The next five pages will show you examples.
- Find a signal anomaly
- Verify serial and parallel buses
- Search for a noise source
- Margin testing with a noisy signal
- Validate a switching power supply
As always, your mileage may vary according to your needs and requirements – be sure to take a close look at spec sheets in comparison to your intended applications. But with prices coming down to match "standard" digital oscilloscopes and wireless becoming commonplace in embedded systems, it’s safe to say that integrated oscilloscopes are here to stay and represent the future of where oscilloscopes are headed.
Discovering and capturing signal anomalies can be one of the most difficult debug challenges. Subtle or infrequent anomalies on just one signal can mean the difference between a design that works reliably and one that doesn’t.
As is often the case, while probing signals on the circuit board, faint traces are occasionally visible on the waveform, indicating infrequent and unexpected events that don’t look like the digital signals. The use of an intensity-graded display helps to confirm that infrequent anomalies exist on the signal, but they disappear from the display too quickly to measure. Although infinite persistence could help when looking at a single signal, it is not compatible with rapid probing across a PCB.
To discover signal anomalies while probing around the design and to get a sense for how often the anomalies were occurring, the oscilloscope’s color-graded fast acquisition mode was enabled. This acquisition mode speeds up the waveform acquisition rate to over 280,000 waveforms/s. That’s fast enough to capture any signal anomalies. Figure 1 shows a color-graded display that indicates the most frequent signals in red and the least frequent signals in blue. In this 3.3 V digital signal, occasional narrow pulses, or glitches, are visible. The low-amplitude runt pulses, which are a little over 1 V high, also appear in a blue color. The next step was to use a runt trigger to isolate and capture each runt pulse.
Figure 1. A fast-acquisition mode lets you capture signal anomalies.
You may need to know how often are the runt pulses occur. The front panel controls provide access to manual and automatic waveform navigation tools with functions like pan and zoom so even long acquisitions can be examined. Manual navigation through long signal acquisitions can, however, be tedious and error-prone. Events of interest can be missed when manually scrolling through millions of data points. When manually navigating through the signals, how can you be confident of finding all occurrences?
The solution to this problem is to automatically search the signal for all instances of a specified event. Specifying search events is similar to specifying trigger events. The oscilloscope will then automatically mark every event and enable the user to find them by navigating between marks with front panel arrow buttons. In this case, the runt trigger setup was copied into the automatic search setup and three runt pulses in the acquired signal, spaced approximately 3.25 ms apart, were discovered. Armed with this information, the user was able to correlate events that occurred at this rate and isolate the cause of the signal anomaly.
For debugging embedded systems, including those with both parallel and serial buses, an integrated oscilloscope lets you perform protocol analysis on serial buses and a logic analysis on parallel buses.
On the serial side in this example, the design uses an SPI serial bus. Because this is a simple bus, the oscilloscope only needs to capture three signals. After you define a few serial bus parameters such as digital threshold levels and serial signal configurations, the oscilloscope will automatically decode the bus data.
This SPI serial bus drives a serial-to-parallel converter. To verify the timing relationship between the serial and parallel buses, acquire the eight parallel bus signals with the digital channels. After defining a few bus parameters, the parallel bus will be automatically decoded and displayed. The oscilloscope can decode and display up to two parallel or serial buses at a time. With the synchronized display of the two buses, the timing relationships between the serial and parallel bus data became obvious. In most cases, the parallel bus value is set to the serial bus data value right after the serial packet has been transmitted.
To facilitate debugging tasks, the serial trigger can be set to stabilize the display and capture specific serial events. In this case, a trigger was set up to capture the signals every time the hex data value B0 was transmitted on the serial bus. As shown in Figure 2, the parallel bus value did not change when the serial value B0 hex was transmitted. Further investigation showed that the design wasn’t working quite as expected.
Figure 2. Mixed signal display stabilized with serial trigger capturing B0 hex data packet.
Another common task in embedded-system debugging is tracking down the source of noise in a design. An integrated spectrum analyzer lets you investigate time-domain and frequency-domain signals. In this example, a high-frequency signal riding on one of the low-frequency signals was discovered while probing around the circuit board. Using a cursor measurement in the time-domain display, the dominant noise was seen at about 900 MHz.
Switching to an integrated spectrum analyzer, a near-field probe was used to capture radiated signals. The spectrum analyzer’s center frequency was set to 900 MHz and the span set to 2 MHz. A dedicated front panel keypad is available for setting these and other RF parameters. Then the near-field EMI loop antenna was slowly moved over the circuit board looking for the highest signal level at 900 MHz. The strongest signal was found at the output of a clock generator circuit in an FPGA as shown in Figure 3.
Figure 3. The spectrum analyzer revealed a strong 900 MHz radiation emitted by an FPGA.
For further analysis, a spectrogram display could be used to monitor variations over time. In this case, the signal appeared to be fairly stable. After examining the FPGA layout, it was determined that the signal corresponded to the ninth harmonic of the 100 MHz Ethernet clock. A poor circuit board layout resulted in magnetic coupling to other signals.
Margin testing is another everyday task. A waveform generator lets you creating a programmable stimulus that you can use to perform a margin test.
In this example, the noise margin of a CAN bus serial receiver circuit was characterized using an integrated oscilloscope. First, a live CAN signal was captured with an analog channel on the oscilloscope and loaded into the integrated arbitrary/function generator’s edit memory. Then the waveform generator was used to repetitively output the captured serial stimulus signal to drive the receiver circuit’s input. The serial output of the receiver circuit was then acquired with channel 3 of the oscilloscope and the decoded serial output displayed. In this example, adding a bus trigger stabilized the display.
Gaussian noise was then added to the serial signal and the decoded output of the receiver circuit was monitored, looking for data packets to begin to change or disappear, indicating bit errors. This is shown in Figure 4.
Figure 4. Capturing missing serial packets at the output of the serial receiver can indicate bit errors.
By monitoring the decoded output of the receiver, we found that the receiver design worked well with noise levels up to about 40% of the serial signal amplitude, but demonstrated significant errors when the noise level reached 45%-50% of the signal amplitude. This test method is effective for quickly verifying a receiver’s noise margin.
Oscilloscope-based power measurements let you get the same accurate and repeatable results, even if you rarely deal with power measurements. This example shows how to make common power measurements with an oscilloscope using automatic power measurements, an integrated DVM, a differential voltage probe, and a current probe.
In this example, the input voltage (yellow) and current (blue) from an AC-to-DC converter is shown in Figure 5. The integrated 4-digit DVM monitored the DC output voltage. The measurement statistics at the right side of the DVM display indicate that the output voltage is very stable. The graphical readout provides a visual indication of voltage variations. A power-measurement application was then used to take input power quality measurements including power, crest factor, and power factor to characterize the effects of the power supply on the AC power source. From there, current harmonics measurements were used to provide a frequency-domain analysis of the input current, in both graphical and tabular formats.
Figure 5. The DVM monitors the power supply’s DC output voltage while the oscilloscope displays AC input voltage waveform (yellow) and the current waveform (blue).
Another key power measurement is switching loss in power devices, a major limitation to a power supply’s efficiency. In Figure 6, the differential voltage across the MOSFET (yellow trace) was measured, as was the current flowing through the switching device (blue trace). Then the instantaneous power waveform was generated (red trace) and switching loss power and energy measurements were displayed.
Figure 6. The screen displays voltage, current, and power loss in a MOSFET.
Finally, a measurement called safe operating area allows automatic monitoring and pass/fail testing of switching behavior over various input and load conditions. By comparing the switching device’s voltage, current, and instantaneous power levels relative to the device’s maximum ratings, this measurement is used to assure that device reliability will not be compromised by exceeding specifications.
About the author:
Scott Davidson is Marketing Manager, Tektronix, MidRange Scope Product Line. With more than 30 years of experience at Tektronix, Davidson has held a variety of engineering and marketing positions, as well as manufacturing and engineering management roles. He holds BSEE and MSEE degrees from Montana State University.
This article originally appeared in EDN, an American sister publication of eeNews Europe.