Serial Bus Decoding and Applications

Serial buses appear in virtually all kinds of electronic products from cars and trucks to personal audio players and mobile phones. In addition to standard low-speed protocols such as I2C and SPI or CAN and LIN automotive buses, many specialized, proprietary protocols are used.

According to Teledyne LeCroy’s technical marketing communications specialist David Maliniak, “Many of today's serial data-communications protocols are built on Manchester or NRZ encoding. Such protocols range from specialized buses such as Digital Addressable Lighting Interface (DALI) for control of building lighting, Microchip Technology’s UNI/O bus for embedded systems, and the Peripheral Sensor Interface 5 (PSI5) used to connect sensors to controllers in automotive applications to proprietary custom buses used for nonstandardized applications. In all of these cases, the basic Manchester and NRZ schemes are modified to create the more complex, specialized protocols.”

He continued, “Teledyne LeCroy's Manchester and NRZ protocol decoders aid in the process of designing and debugging such custom protocols by providing broad flexibility in terms of physical-layer characteristics, protocol word, and frame structure as well as other parameters. Users may specify bit rates from 10 bits/s to 10 Gbits/s. Idle states, sync bits, and header and footer information can all be configured to decode custom preambles or CRC details. Decoding is highly flexible: data mode can be in bits or words; viewing is selectable in hex, ASCII, or decimal; and bit order may be either LSB or MSB [first].” As shown in Figure 1, “Decoded information is displayed with a color-coded overlay, which expands or contracts as the user adjusts the oscilloscope time base or zooms in on the waveform for more details,” Maliniak concluded.

Figure 1. Ethernet Decode

Courtesy of Teledyne LeCroy

Yokogawa also has very flexible serial bus decoding capabilities. The DLM4000 MSO user’s manual describes a user-defined serial bus trigger that can use data from any one of the scope’s eight channels as input. In addition, the data can be latched or sampled by a selected clock source on another channel. The data, clock, and chip select qualifier menu fields all have separately controlled polarities. You can specify up to 128 bits for the trigger serial pattern.

Tek’s DSA and MSO models provide generic serial pattern triggering. This capability comes with option ST6G for DPO models. Up to 64 bits of NRZ-encoded binary or hex data can be recognized as a combination of high, low, and don’t-care states at rates up to 1.25 Gbaud. For 8b-10b-encoded data, one to four 10-b characters form a pattern that can be recognized at a variety of rates: 1.25 to 1.65 Gbaud, 2.0 to 3.25 Gbaud, 3.5 to 5.2 Gbaud, and 5.3 to 6.25 Gbaud. DSA and MSO models also support triggering on AMI-, HDB3-, BnZS-, CMI-, and MLT3-encoded communications signals. On DPO models, the MTH option is required.

Teledyne LeCroy’s SDA serial data analyzers use a specially programmed FPGA to support serial triggering on up to 80-bit NRZ data. This feature is optionally available on the company’s scopes with >4-GHz bandwidths and provides serial data pattern, symbol, and primitive triggering at up to 14.1 Gb/s. To ensure reliability and stability at these high rates, signal equalization is included. For 8b-10b-encoded data, triggering can be specified to occur on invalid symbols and running disparity errors.

As explained by Pico Technology’s Jeff Bronks, senior technical author, “PicoScope’s serial data triggering is executed in software. This means that the hardware captures data either continuously or on command from a standard oscilloscope trigger such as an edge trigger, pulse width trigger, or any other advanced trigger type offered by PicoScope. Having captured and decoded the data, PicoScope can optionally apply software triggering so that data is not displayed until a specified condition is met. The software trigger can monitor any field in the decoded data: payload bytes, start and stop bits, and so on,” he concluded. Figure 2 shows decoded data and the captured waveforms.

Figure 2. CAN Decode and Waveforms from PicoScope 2204A

Courtesy of Pico Technology

Scott Davidson, product marketing manager at Tektronix, related two instances of customer problems that needed serial bus capabilities for solution.

“One typical example was debugging a voltage-controlled oscillator circuit which behaved unpredictably when the processor adjusted the frequency via an SPI bus driving a DAC,” he said. “When the user displayed the oscillator output signal, the analog frequency control signal, and the decoded SPI bus, the control signal did not behave as expected from the software execution. Further examination of the bus showed that the serial data was being transmitted MSB-first, rather than LSB-first, as expected by the DAC.

“Another recent example was tracking down and correcting a source of EMI in an embedded design,” Davidson continued. “During design turn-on, the engineer started noticing high-frequency noise riding on some of the low-level analog signals at various locations on the circuit board and that the amplitude of the noise increased dramatically for short periods of time. Measurements indicated that the dominant noise source was about 137 MHz.

“Using a mixed-domain oscilloscope (MDO) and a near-field EMI probe, the board was examined for RF signal emissions around 137 MHz. Once a strong signal was located, the RF signal trigger was used to trigger the MDO only during the strongest 137-MHz RF transients. Then, by examining nearby signals at the trigger point, it was discovered that the increases in 137-MHz RF energy corresponded to data packets being transmitted on the high-speed USB bus.” Davidson concluded, “By aligning the RF amplitude vs. time display with the decoded USB bus display, the user was able to verify that the transients were indeed caused by activity on the USB bus, and they also were able to determine that the specific data values transmitted on the USB bus had no measurable impact on the amplitude of the RF transient,” he said.

Teledyne LeCroy’s Maliniak described how one customer dealt with a difficult automotive sensor application that included lots of serial bus signal noise, low signal amplitude, and a high DC offset.

“The noise and high-voltage DC offset essentially ruled out use of a logic analyzer in this application as the signal caused false-positive transitions. Thus, the customer turned to his Teledyne LeCroy WaveRunner Xi-A oscilloscope equipped with the configurable Manchester protocol decoder. Upon feeding the sensor signal to the oscilloscope and invoking the Manchester protocol decoder, the customer was initially unable to decode the signal…. With ERES [enhanced resolution mode], the customer smoothed the noise in the signal to a great degree.

“After taming the noise problem, the next challenges were the signal’s low-amplitude and high-voltage DC offset.” Maliniak explained, “To address these issues, the customer configured the Manchester protocol decoder to use an absolute amplitude level value and a percentage-based hysteresis value…. A final step was to better define the decoder’s interpretation of the signal by setting the data mode to words, viewing it in hex format, and specifying a MSB bit order.”

And, Yokogawa’s William Chen, applications engineer, discussed how the company’s ScopeCorder was used to address yet another automotive application. “One of our client’s projects required a single instrument, which needed to be installed within the vehicle, to measure multiple ECU signals during a test drive. There was a need to observe the waveform details of more than four channels of the ECU signals along with other sensor signals such as rotational speed, fuel injector pulse times, crank angle, and CAN bus in real time. Not only are more IO signals used as the control system becomes more sophisticated and complicated, but the need for faster sampling and higher bandwidth [increases]… as noise becomes pervasive in the system design,” Chen explained.

“The Yokogawa DL850EV Electric Vehicle ScopeCorder was a unique and complete solution to our client’s problems,” Chen continued. “With the ability to run on DC battery power and its ergonomic, portable design, the DL850EV could be installed into the vehicle for a live test drive. Using flexible modular inputs with built-in signal conditioning, it combines measurements of electrical signals, physical sensors (temperature, vibration/acceleration, strain), and CAN/LIN serial buses and is able to trigger on simple and advanced conditions in real time.” He concluded, “An optional GPS input receiver on the DL850EV allowed the engineers to correlate and synchronize the vehicle action, ECU waveforms, and vehicle position data at high time-based precision.”

Sponsored Recommendations

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!