News & Analysis

Mixed-signal oscilloscope resolves clocking issues in serial bus system debugging

Angelica Sostheim

7/11/2003 6:43 AM EDT

Mixed-signal oscilloscope resolves clocking issues in serial bus system debugging
As applications have grown in complexity, serial buses have begun to supplant parallel buses. One of the advantages of a serial bus over parallel bus is the small number of signal lines required. Also serial bus designs use lower power, fewer pins, and less board space - thereby reducing product cost. Many designs incorporate more than one type of serial interface for communication. For example, a design may use an I2C bus to communicate locally with an EEPROM and then another device may use a SPI bus to communicate with other peripherals in the design. The entire design may then connect to an external network via USB or CAN.

But there are a number of challenges associated with debugging serial bus designs. For instance, it is difficult to extract information about the protocol itself and to determine the interaction between devices - due to the long serial data streams. This measurement challenge builds upon those designers already encounter when debugging today's mixed analog and digital serial bus designs. For in addition to analyzing the behavior of the serial bus protocol itself, parametric measurements must be performed - rise and fall times, setup and hold times, analyzing voltage levels, and the like.

A popular strategy for debugging serial-bus systems has been to employ a logic analyzer, combined with an oscilloscope, triggering on a serial-bus transition of interest. But that can be difficult because there is no time reference for all of the data, simply because being serial, it is read sequentially, bit-by-bit.

To meet these challenges, a preferred method is to use a mixed-signal oscilloscope (MSO). These oscilloscopes are called 'mixed signal' because they can view digital and analog behavior simultaneously on many channels. The MSOs are equipped with specially-designed triggering capabilities tailored to specific serial data formats that are coming into use. They solve the difficult problem of triggering on the specific protocol conditions encountered when one uses a separate logic analyzer and oscilloscope. Such MSOs finds a desired pattern automatically in a long serial stream without the chore of creating a complicated state machine in a logic analyzer.

An instrument like the Agilent 54642D MSO, for example, provides 16 digital-timing channels and 2 analog scope channels with bandwidths up to 500 MHz, in a single instrument. In addition, this MSO has very deep memory acquisition capability. Its triggering features are easy to set up and can reduce the time the user currently spends in debugging problems in embedded systems that utilize serial bus communications. The serial bus triggering features in the MSO can trigger on serial buses with a synchronous clock - such as the I2C and SPI buses - that have separate clock and data lines. In addition, such an MSO is able to establish a trigger on serial buses that have an embedded clock within the data stream - such as CAN and USB.

These triggering features make it easy to correlate the sequential data and timing on long streams of data. This provides a designer with the ability to look at the fast digital signals and correlate them with slower analog signals on long, serial data streams. Also, the MSO's sixteen digital and two analog channels of acquisition are automatically time correlated. The dilemma of having to trigger twice to acquire a long time capture or to view detailed resolution is solved with the deep memory.

Debugging an I2C bus system
The I2C bus comprises two active signals, SDA and SCL. (Note that each component on the bus has its own unique address.) Here's a typical problem that is likely to be encountered in debugging an I2C-based system: The microcontroller may request information from a slave device, such as an LCD controller, and then not receive any information back from that device. Debugging this problem with a conventional scope would require the user to digitize a long data record using either an edge or pattern trigger. The user would then need to scroll through the individual data frames, one-by-one, to search for the particular problem. This technique would be very time consuming.

An MSO with I2C triggering features and deep memory make it possible to probe the two signals of the bus along with other signals, such as the data and address lines of an EEPROM, to detect where the problems are occurring in the system. Setting up the I2C triggering features is a matter of assigning the data (SDA) and clock (SCL) to specific scope channels, and then selecting the I2C serial triggering options. The two lines of the bus can then be probed by either the digital timing channels or the analog scope channels and are automatically labeled on the screen.

It is also possible to trigger on content, reading or writing from a specific address and data value. In a typical I2C frame, for example, there is a start condition, a control byte that configures the particular slave to be read from or written to, a valid acknowledge clock pulse and other bytes of the transferred data. The MSO can be configured to trigger on the address and/or data of the control byte or the secondary byte. This triggering feature enables the user to look within the I2C frame to trigger when a device at a particular address is written to - or read from with a data value. This triggering feature enables the user to look within the I2C frame to trigger when a device at a particular address is written to - or read from - with a data value. This feature is useful in finding errors in software routines that write incorrect data to a device.

EEPROM data can also trigger a scope read operation. In the I2C protocol, EEPROMs have a predetermined address on the bus in the form of 1010xxx binary. The EEPROM data read trigger looks for an address matching this pattern on the SDA line, followed by a read bit and then an acknowledge bit. When the data matches the qualified condition set by the user, the MSO triggers on the acknowledge clock edge after the data is sent. The MSO can trigger on a "current address read" cycle, a "random read" cycle - or on any data byte within a "sequential read" cycle. The MSO trigger hardware looks for the appropriate control byte first, followed by any data byte that meets the user-specified qualifications. These qualifications include less than, greater than equal, not equal, and don't care.

For example, suppose a microcontroller stores calibration data from a temperature sensor in memory to use at a later time in a program. But when the data is read back, it is corrupt and causes the sensor to perform incorrectly. This trigger feature of the MSO provides the user an easy way to track and debug data being read from an EEPROM in the system.

New technologies bring with them new design and debug challenges. The MSO provides an added dimension to solving problems when debugging microcontroller and DSP-based designs incorporating serial buses. It solves the problems associated with debugging serial bus interfaces by providing a unique solution that uses a MSO with specially designed triggering capabilities to debug protocols and the interactions of devices on these buses. Having a single instrument able to debug many parts of a system can reduce debug time, cost, and frustration, and helps to get designs out the door and into production faster.

Angelica Sostheim is an applications engineer in the Oscilloscope product line at Agilent Technologies, Palo Alto, Calif.

See related chart





Please sign in to post comment

Navigate to related information

EE Buzz DesignCon

Datasheets.com Parts Search

185 million searchable parts
(please enter a part number or hit search to begin)

Feedback Form