Meeting embedded design challenges with mixed signal oscilloscopes
Embedded design and especially design work utilizing low speed serial signaling is one of the fastest growing areas of digital electronics design. The need to communicate between modules, FPGAs, and processors within a wide array of consumer and industrial electronics is increasing at an astounding rate. Customized communication protocol and bus usage is critical to design efficiency and time to market, but comes with the risk of being sometimes difficult to analyze and debug. The most common sources and types of problems when using low speed serial data in an embedded application include timing, noise, signal quality, and data. We will recommend debug tips and features available in modern oscilloscopes like Rigol’s MSO5000, that will make debugging these complex systems faster and easier.
Types of Errors
Timing
Timing is critical in any serial data system, but finding the system timing limitations related to components, transmission length, processing time, and other variables can be difficult. Let’s start with a simple 8 bit DAC circuit. First, make sure you understand the data and timing specifications for the protocol in use. Does it sample data right on the clock edge? How far off can the clock and data be when we still expect good data? In other words: do we have a clock sync error budget defined? Once we understand these timing requirements then we can experimentally verify both the Tx and Rx hardware subsystems. Now we can analyze the system level timing delays and the overall accuracy of the conversions because we can make direct measurements of both the logic and analog channels in a time correlated fashion. We will also be able to simultaneously view the decoded bit patterns numerically on the MSO5000 oscilloscope.
Here is a simple example of measuring one bit (out of 8) on channel 2 (blue) that is driving the DAC input that is creating the sine wave on channel 1 (yellow) at the DAC output.
Utilizing parallel bus decoding (Figure 1) we can get a quick look at the transitions of this single line. But this doesn’t give us all the information we need since the DAC is utilizing a number of data lines to set its output level. Getting more complete data requires a different approach. Let’s move all the DAC lines (Figure 2) over to the MSO’s digital inputs. Now we can see how the digital lines really coordinate with the DAC output.
To investigate further we can simplify the decoding to show Hex values and zoom in so we can view the decoded data.
Now we can use the zoom feature to clearly see the relationship between the bit and DAC transitions (Figure 3). For the zoom we have turned on analog channel 2 (in blue) that is on the DAC clock. Zoomed in by a factor of 500x from 50 μsec per division to 100 nsec per division allows us to see that the bit transitions are occurring 140 nsec before the clock transition. The clock transitions in under 5 nsec and the DAC output starts changing in sync with the clock. We can also utilize the scope cursors to make the timing in the transitions clearer and well defined.
We can also trigger on the digital patterns instead of the analog signal. Triggering on a digital pattern can be critical for debugging when there is a problem. There isn’t always a good way to track events from the analog side of a system. When using a digital trigger method make sure to set the additional trigger parameters. These may include start bits or even address and data for some protocols. Even for a simple parallel bus like this you need to define and arrange the channels in the bus for the results to be easiest to interpret.
Accurate timing of Low Speed Serial signals is critical to system stability. Therefore, making sure your measurement tools are up to the task of precise and easy triggering, monitoring, and analyzing of your waveforms is vital to improved R&D efficiency and ultimately time to market.
Noise
One of the most common issues in correct serial data measurements is the handling of system noise. Noise in these measurements can come from a number of sources including poor grounding, bandwidth issues, crosstalk, electromagnetic immunity (EMI) problems. Sometimes the problem is in the device, but improved probing and measurement techniques can also improve the results significantly without changing the device under test. A good first step is always to make sure we are using best measurement practices.
Here is a decoded I2C bus segment using a 5000 series oscilloscope (Figure 4). In the first example we have extremely poor grounding on our probes. Because the scope’s ground is tied directly to power ground signals that need to float or simply use a different or noisy ground plane can cause results like this. It is also possible for high current draw through ground in local power to create ground loops that can cause noise to be injected in your system.
We solve these problems in order from easy to difficult. First, we can look at our probe connections. Normally, we would use the alligator clip ground strap that connects on the probe to make a ground connection. Assuming we are doing that correctly and still having a problem we may need to use the ground spring instead. The ground spring connects closer to the probe tip and significantly reduces the loop area of the connection. This can significantly improve noise and signal quality (Figure 5) especially for high speed signals or signals sensitive to capacitance or coupled voltages. All RIGOL probes come with both the standard ground strap and the ground spring for these types of measurements.
If ground noise is still an issue, try isolating your device from ground. The scope operates best grounded to AC power ground via the plug. If the rest of the device or system being tested can be isolated from ground this eliminates ground loops. If ground noise is still an issue you may consider a differential probe like Rigol’s RP1100D which enables measurements without reference to ground on the scope. Differential measurements may be the only way to clearly view some low speed serial data such as a LVDS bus (Low Voltage Differential Signaling). Buses like this purposely move the reference line to maximize bandwidth and increase communication distances, but it may require true differential probing or the use of multiple channels of your scope together to view the signal correctly.
Now that we have improved our signal to noise ratio by decreasing noise injected from the ground, we can turn our attention to bandwidth filtering. High frequency noise can also enter your measurements via channel to channel cross talk or other high frequency sources nearby or within your device. One way to address this is to utilize the channel bandwidth limits for every channel. Every RIGOL scope channel can limit the bandwidth to the ADC. A 20 MHz limit is pretty standard. Additionally, there are a few acquisition mode and triggering settings that can improve performance in the face of noise. Many trigger types have a menu item allowing you to turn on noise rejection for the triggering scheme. The 5000 series even includes HFR and LFR (high and low frequency rejection) as options in how to couple the signal triggered on. The MSO5000 series comes with High Res or High Resolution mode. This feature uses extra oversampling that is being done behind the scenes on many measurements to provide an average that results in less noise. This will average rather than reject high frequency signals, so be sure to understand your potential error sources and how they may interact with your measurement setup. Finally, the 5000 series scope also has an NRJ (noise reject) feature directly within the trigger menu. This removes noise that appears in bursts and can be set in time rather than frequency. To further isolate and locate sources of noise within your system you may want to focus on EMC or EMI related issues.
Noise is always a concern when working with low speed serial signals. By definition these signals continue to go to higher speeds, more advanced encoding, farther transmission distances, and lower voltage and power levels. All of these trends make hardware more susceptible to noise. Making careful measurements that limit or eliminate adding noise to our system then enables us to focus on noise in the system that may still cause long term design issues.
Signal Quality
Monitoring and improving the quality of low speed serial signals is another critical part of the debugging process. Issues like impedance mismatches, bandwidth, and loading errors can all effect the quality of signals even when noise isn’t present. Now that we are looking more closely at the exact nature of these signals it is important to verify the way we are using our oscilloscope for these tests. For signal quality tests we will be using the analog channels because they provide the best look at what is actually occurring with our signals. This requires some additional forethought. To clearly see data transitions, we should definitely use a sampling rate that is as high as possible. Sampling at 5x the bit rate of the digital bus should be considered the minimum because of the high frequency components that we need to visualize. Sampling at 10 times the bit rate should enable us to see any of the issues.
To capture more decoded bytes than you can view on the display use the event table function (Figure 6). You can also export the table results to a text file from the event table menu for record keeping or offline timing analysis.
After having set and verified our sampling times for best analog and decoding results, we also want to set our display up for optimal triggering conditions. When triggering on the rising edge of an analog signal make sure to keep the trigger level at least 1 division away from the signal low state. This separation allows for consistent triggering action without any false triggers. When visualizing digital signals with the analog channels use more screen area when possible. Using about 2 vertical divisions and about .5 to 1 horizontal division per decode character will allow you to see any major overshoot or impedance issues as well as some of the other types of error we will be looking at. Here is the preferred setup (Figure 7) to monitor decoded data on a bus like RS232.
Figure 7: Setup to monitor decoded data on a RS232 bus
On a more complex bus like I2C we view both clock and data lines on the screen. The timing correlation between multiline buses is, of course, vital to successful decoding. Making critical measurements on the screen like risetime and overshoot for each line makes reliability tests simple to setup. In addition to the risetime and overshoot for the 4 serial bus lines you can also see the jitter in the clock when compared to the data transition. In (Figure 8) we zoom in on the data transition to get a more accurate measurement of the risetime and overshoot.
Data
The key to any Low Speed Serial application is the ability to quickly and easily look at the data being transmitted. This means adding the capability to do embedded decoding on your oscilloscope. Decoding affects both the triggering and display on the scope. It adds a decoded bus display to the instrument’s screen. You can decode values as ASCII or as hex, octal, or binary data depending on what you want to look at. You can also trigger on these values to make sure you are looking at the packets of most interest to you. In addition to triggering on these signals with the decode specific trigger you are also able to trigger on any type of signal with a zone trigger which allows you to not only to trigger on any type of signal but also exclude any unwanted noise or data from a signal. These are created by simply drawing a rectangle on the screen of the instrument.
In Figure 9 two zone triggers are used as an example. The oscilloscope triggers if these two areas are not crossed by a signal. This signal can also be displayed via the search and navigation menu. In this way, multiple trigger points can be displayed and easily navigated on the signal when the oscilloscope has finished scanning. All trigger points are shown in the search and navigation menu and correspond to the white triangles at the top of the screen. The trigger point highlighted in the table corresponds to the red triangle at the top of the screen. To see how decoded segments differ over time, or to compare triggered events when other signals could affect the results, it is often the best analysis method to use the recording mode. RIGOL’s record mode enables the acquisition of thousands of frames around a trigger event. For example, Figure 9 shows 18 frames with 50 Mpts each. This means that 900 Mpts are recorded with the MSO5000.
These recordings can be stored and played back as a movie as well, but the analysis features let you search for failures or outliers while also viewing decoded data for comparison. Data errors as well as the debugging process are always closely tied to the protocol and its specifications. To be efficient with your test equipment make sure you are utilizing the best analysis method to easily view the data you need to see without extraneous results getting in your way.
Another method to find errors is the use of a pass/fail mask (Figure 10). Information can be shown here in which the number of good/faulty frames is counted. In this test, the device can be set so that a screenshot is saved in the device for each fail or that the pass/fail output on the back generates a TTL signal for each fail.
Keys to Look Out For
Proper Oversampling & Bandwidth
As discussed, proper sampling is critical to making correct measurements as well as completely debugging your low speed serial signal. A good rule of thumb for analog signals is 5x the bandwidth of the signal you want to measure. This limits your risetime error to about 2%. To view the best detail on high frequency signal components set up your scope to achieve 5-10X over sampling as well. When digital signals this means sampling 5 times in the width of one bit. When sampling on digital lines or for sampling that will be used for decoding, oversampling is less important but set up your measurement device so it is as similar as the LSS receiver you will ultimately be using. This gives you the best chance to focus on material errors that will cause problems down the road. The MSO5000 series, for example, has a maximum bandwidth of 350 MHz and 8 GSa/sec.
Grounding, Noise, and Differential Signaling
Proper probing and understanding the use of differential vs. ground-referenced signals is important to debugging. If your data lines are not ground referenced make sure to understand the impact of ground loops and ground coupled noise on your measurements. Use proper probe techniques and advanced noise cancelling features on the scope to limit noise sources. If necessary, add differential probes to your measurement system to improve measurement quality.
How to Best View Low Speed Serial Signals
There are a number of methods for analyzing, viewing, and evaluating LSS bus activity on a modern oscilloscope. The best way differs depending on whether you want to look at a single bit transition for noise, speed, or synchronization; whether you want to look at a complete packet of data; or if you want to compare packets and packet timing over a longer time period. Make sure your bench tools allow you to see everything you need and familiarize yourself with features like zoom, record mode, search and navigation, event tables, deep memory, and automatic measurements as well as how they interact and how best to transition between them when considering your test plan. Ideally, an oscilloscope empowers you to view all the results you need and quickly switch modes to acquire additional information.
Conclusions
Embedded design and debugging of digital data is a growing test requirement in a broad range of consumer and industrial applications. Having the right mixed signal oscilloscope like the MSO5000 series can make viewing, analyzing, and resolving issues including timing, noise, signal quality, and data easier and faster. This improves engineering efficiency and time to market. RIGOL’s line of UltraVision II enabled oscilloscopes comes with standard or optional capabilities for the methods and measurements discussed here and are powerful benchtop instruments that provide uncompromising performance at unprecedented value.
If you enjoyed this article, you will like the following ones: don't miss them by subscribing to :
eeNews on Google News
