Debugging I2C: Waveform + Protocol Analyzer = Easier Debug!

We have all debugged SOC and IP level issues using signal level waveforms. Its a tedious and laborious process. Are there any ways that can make design debug easier? Wouldn’t it be great if I could look at fully decoded transactions instead of signal toggles? In this series of posts, we will try to come up with the best way to look at some typical interfaces in order to reduce debug effort and increase productivity.


I2C (Inter Integrated Circuit) is a simple protocol specification for low speed inter-chip communication. While the protocol is really simple, debugging issues on the I2C bus can be really painful! This is because:

  • I2C is a serial bus
  • The bus supports multiple masters and slaves
  • Both master and slave can transmit on the same wires
  • Transmitter can insert wait states
  • Multiple message formats are supported

Typically, engineers would like to do the following while debugging I2C:

  1. Figure out when a START, STOP, ACK occurs on the I2C bus
  2. Figure out what data is being transmitted over the I2C bus
  3. Figure out what messages are being transmitted over the I2C bus
How long does it take for you to answer the above questions by looking at the below waveform?:
It takes too long to answer these questions by looking at the above waveform! What engineers need is a tool that can analyze the above waveform and give them an easier to understand and analyze the output. Our PDA tool can process a signal dump and give the same information in a tabular form as follows:

In the above table, the PDA tool shows the START, STOP, ACK/NACK and DATA on the I2C interface.

As you can see, the information presented by the PDA tool makes immediate sense as it shows fully decoded information. The amount of information you can glean from the PDA in 10 seconds will take 5 minutes or more if you use a waveform viewer only.

This is especially useful at system level debug as SOC level engineers might not know protocol specification details. Using the PDA tool, even inexperienced design/verification engineers can achieve high debug productivity. In PDA, they have a friendly tool that knows the protocol details.

When used along with a traditional waveform viewer, the PDA tool provides excellent debug visibility and traceability; from signal level to transaction level.

The PDA tool can also show higher level messages transmitted on the I2C interface. For example, in the waveform above, CCI (Camera Control Interface) messages are being transmitted. The PDA tool will decode the various START, STOP/RESTART, ACK/NACK and DATA items into CCI messages as follows:


Each of the above READ or WRITE CCI messages consists of a series of I2C START, DATA, ACK/NACK sequences.

In this way, using the PDA tool, engineers can easily look at information at waveform level, I2C item level or higher abstraction message level.

The PDA will also perform protocol checks. For example, in the above screenshot, the PDA identifies that, at time 4160ns, something transmitted on the I2C interface did not match any known CCI message pattern. This can point directly to a bug or can give a clue for further debug.

Thus, using the PDA tool’s visualization, analysis and monitoring capabilities, engineers can reduce time taken for debug tasks from hours or minutes to seconds!

The PDA tool from Arrow Devices can help you. You can also look at a short 3 minute video. (No earphones? No worries! It has subtitles!).

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s