I2C SPI USB CAN eSPI Cable Testing View All Quick Start Guides User Manuals Software Downloads Knowledge Base Videos Case Studies App Notes White Papers Sales Support About Us
Products Blog Sales Support Contact Search
The Advantages of Protocol Analyzers for Debugging Embedded Systems
Staff Writer

Embedded systems engineers use a variety of skills and tools to build and program products that contain embedded computing systems. Along with coding software, software debugging programs, and simulators, most embedded systems engineers make use of a protocol analyzer, a specialized diagnostic tool that can be used to monitor bus traffic across a communication channel. Protocol analyzers are available for many different specialized applications and at several price points - they are a valuable tool for embedded engineers whose work requires them to understand the movement of data on the embedded systems that they design and build.

In this week’s blog post, we'll explain more about what a protocol analyzer is, what they’re used for, and the key advantages they provide for embedded systems engineers that use them to test and debug embedded systems.

BeagleWhat is a Protocol Analyzer?

Protocol analyzers are also sometimes called network analyzers or packet analyzers. This is because they can be used to monitor data traffic on a computer network, where data is typically sent between different network points in "packets."

A protocol analyzer is a tool used to capture and analyze signals and data traffic across a communication channel. There are many different types of communication channels for which a protocol analyzer can be used, ranging from a local computer bus to a national telecom network.

In embedded systems design, protocol analyzers are used to monitor data on a local computer bus where the communication protocol is typically either I2C, SPI or MDIO. These well-known communication protocols are used to facilitate short-range intra-board data transfer between the microcontroller and peripherals that make up the embedded system.

Engineers can also develop embedded systems using the popular Universal Serial Bus (USB) protocol. A high-speed USB protocol analyzer can produce USB capture rates of up to 5000 Mbps, displaying and analyzing data traffic on the bus in real-time to help engineers isolate and resolve errors. High-speed USB protocol analyzers are more costly, but offer increased memory and other useful features that help justify the added expense.

Protocol Analyzers Use Hardware and Software

Protocol analyzers do two important jobs when it comes to monitoring traffic on a bus.

The first job is monitoring and logging the data, meaning the protocol analyzer must be configured correctly with the system to ensure that all relevant data is captured. For embedded systems, the protocol analyzer data lines, clock, and ground lines must be adequately connected to the communication channel data lines, clock, and ground lines.

Once the data is captured, the protocol analyzer performs its second function: sending the data to an output device where it can be presented in a form humans can understand. Protocol analyzers are a combined hardware and software solution - a physical device is needed to capture and log the data on the communication channel, and specialized software is required to display the data on your computer. The protocol analyzer can be connected to your PC using a USB 2.0 or 3.0 cable.

Protocol Analyzers Have Several Different Applications

Protocol analyzers are used by embedded systems engineers to test and debug their hardware projects, but did you know that there are other applications for protocol analyzers?

A telecom network protocol analyzer is used to analyze switching and signaling telecommunication protocols used to communicate between different nodes in telecom networks, such as 2G, 3G, and WiMax. Engineers in the telecommunications industry use protocol analyzers to measure network performance and to investigate telecom errors.

Computer network administrators also use a type of protocol analyzer, but they may be more likely to call it a packet analyzer, a network analyzer, or even a sniffer. The "sniffer" is used to "sniff out" packets of data that travel between endpoints on the network. Packet analyzers can be used to monitor traffic on wired networks, but there are also Wifi analyzers that can pick up network traffic on wireless networks.

The tools used by embedded systems engineers to monitor data traffic on the bus may be called “protocol analyzers” or “bus analyzers,” but the two terms are synonymous and can be used interchangeably. When engineers design an embedded system, a communication protocol is chosen that will allow the microcontroller to interact with other devices in the system. There are several protocols to choose from - I2C, SPI, USB, MDIO, and more. Protocol analyzers are used to monitor data traffic for a specific type of communication protocol, allowing engineers to detect better and rectify errors.

3 Key Advantages of a Protocol Analyzer

1. Protocol Analyzers Can Monitor Different Types of Traffic

Protocol analyzers are a valuable diagnostic and monitoring tool for embedded systems, but they aren't the only diagnostic tool available for embedded systems engineers. Logic analyzers can also be used to capture, decode, and analyze the bus data, with the bonus that a single logic analyzer can be used to analyze several types of communication signals regardless of the bus architecture.

While some protocol analyzers like our Beagle USB 480 are pre-configured to analyze only USB traffic, protocol analyzers are also available that can monitor several different types of traffic for added flexibility and value.

Products like the Total Phase Beagle I2C/SPI Protocol Analyzer can be used with I2C, SPI, and MDIO-based products, for functions such as:

  • Non-intrusively monitoring I2C data traffic up to 4 MHz

  • Non-intrusively monitoring SPI data traffic up to 24 MHz Note: This capture performance is dependent on CPU speed and SPI bus throughput.

  • Non-intrusively monitoring MDIO data traffic up to 2.5 MHz (Clause 22 and Clause 45, IEEE RFC802.3

Logic analyzers are useful for measuring digital electronic signals, but to make sense of the data that’s traveling along the wires of your embedded system, you’ll need a protocol analyzer that matches the communication protocol of your embedded system. If you work with several different protocols, you can benefit from a versatile protocol analyzer that works with multiple protocols.

2. Protocol Analyzers are the Ultimate Diagnostic Tool for Embedded Systems

Embedded systems are often built into machines that are expected to run continuously, sometimes for years at a time, without interruption or repair. Sometimes, engineers must design self-recovery features for an embedded system, so that the system can recover itself without human intervention if an error happens.

It may be impractical, impossible, or prohibitively expensive to repair certain kinds of embedded systems once they have been deployed to the end user, so engineers must take special care in testing and debugging systems before they can be released.

This is where protocol analyzers come in handy as a diagnostic tool. Not only can they be used to monitor and display data traffic on the bus, but they can also be used to capture data in real time while simulating an error to test whether the system can adequately recover itself. While troubleshooting and testing at the application level may produce favorable results, the ability to investigate the flow of data on the bus can provide conclusive evidence that a feature is working correctly.

This means protocol analyzers can be used to test the functionality of a developed feature or to diagnose or localize an unexpected error that has been detected.

3. Protocol Analyzers can be Used to Monitor Embedded Systems Performance

In addition to acting as a diagnostic tool for embedded systems engineers, protocol analyzers can be used to assess the performance of an embedded system. Some embedded systems require hard or soft real-time execution with rigid time constraints. These systems often contain an embedded timing chip that can be used to obtain fine-grain measurements of the run-time of a specified code segment. A protocol analyzer is needed to extract run-time information from the embedded system and ensure that time-sensitive processes and procedures are functioning correctly.

Total Phase offers real-time data capture as a core feature of their protocol analyzer products, enabling engineers to access real-time feedback on the functioning of their embedded systems.

Total Phase Protocol Analyzer

Summary

Engineers use many different hardware and software tools throughout the development of an embedded computer system, but protocol analyzers may be the most essential physical tool an engineer has at their disposal. Protocol analyzers enable engineers to monitor the flow of data between the microcontroller and peripherals that make up their embedded system, facilitating real-time monitoring along with diagnostics and communication.

Protocol analyzers are a combined hardware/software solution, with a physical device that reads the data and transmits it to your computer, and a specialized software program that displays and analyzes the data for your review. Protocol analyzers can be used to monitor many types of communication channels, but the most important ones for embedded systems are the I2C, SPI, MDIO, and USB protocols, which are most often used in embedded systems.

Total Phase's protocol analyzers facilitate communications monitoring and diagnostics for embedded systems at an affordable price point for anyone building an embedded computer system. To help make decisions, here is our invitation to request a demo for your specific application.

Request a Demo