Monitoring and Emulating SMBus and PMBus Using Total Phase I2C Tools

Because System Management Bus (SMBus) and Power Management Bus (PMBus) protocols are derivatives of the Inter-Integrated Circuit (I2C) protocol, Total Phase’s I2C protocol analyzers and I2C host adapters can be used with our software to support your SMBus and PMBus projects.

Monitoring and Decoding SMBus Data

The Beagle I2C/SPI Protocol Analyzer works as a passive tap onto your SMBus lines and displays all of the bus traffic sent in real time. This tool allows users to debug the communication between masters and slaves, and with the Data Center Software, users can search and filter through the bus data in real time.

Applying SMBus Decoding

The Data Center Software offers an SMBus decoding option. 

To specify higher-level decoding for all devices on the bus, users can right-click on the I2C/SMBus bus to bring up the I2C Bus Configuration Manager dialog. 

Users will find this dialog with options to set decoding and other SMBus settings:

The Decoding option allows users to specify whether or not higher-level decoding, such as SMBus, will be applied. Here, users can select:

  • None: Higher-level decoding will not be applied.
  • SMBus: SMBus decoding will be applied.

 

In the SMBus Settings, users can specify PEC (Packet Error Checking) usage.

  • Never: None of the transactions contain PEC. This option will be ignored for transactions to SMBus Device Default Address, where PEC is required. If this option is applicable, selecting it will allow for more accurate SMBus protocol-level error reporting.
  • On every transaction that supports PEC: All transactions contain PEC. This option will be ignored for SMBus host notify protocol, where PEC is not used. If this option is applicable, selecting it will allow for more accurate SMBus protocol-level error reporting.
  • Unknown:  Transactions are matched against both with PEC and without PEC versions of SMBus protocols.

 

By checking the “Use default SMBus device address assignments”, the Data Center Software will apply appropriate class-level decoding to the devices with purpose-assigned slave addresses as described in Appendix C of System Management Bus (SMBus) Specification. This option applies only to devices that do not explicitly override bus decoding options. The exception is fixed addresses. If configured as SMBus device, device with slave address 0x08 will be treated as SMBus Host, and device with slave address 0x61 will be treated as SMBus Device Default Address regardless of this option.

To specify higher-level decoding for individual devices on the I2C bus, users can right-click on a specific device in the Bus Pane to bring up the I2C Device Configuration Options dialog.

Here, users will find this dialog with additional options.

 

The “Override bus decoding options” gives the user the opportunity to either use default bus configuration options or specify options for individual devices.

Similar to the dialog mentioned above, this dialog also offers options for “Decoding”, “SMBus Settings”, and PEC Usage. 

If the SMBus Host option is checked, this indicates that this is the SMBus Host device, and cannot be changed.

If SMBus Device Default Address is checked, this indicates that this is the SMBus Device Default Address, and cannot be changed. 

If Class-level decoding is checked, transactions will be decoded using the selected class-level interface. Currently, only Smart Battery System interfaces are supported. For information about these interfaces, refer to the Smart Battery System Specifications.

 

Transaction-Level Parsing

The I2C packets will be grouped based on the presence of Stop condition and packet types, and classified into one of the SMBus transaction types.

SMBus Transaction Types:

  • Quick Command: Quick Command
  • Write/Send Txn: Send Byte, Write Byte/Word, Block Write, SMBus Host Notify
  • Read/Receive Txn:  Receive Byte, Read Byte/Word, Block Read
  • Process Call Txn: Process Call, Block Write – Block Read Process Call
 

Each transaction will be checked against all SMBus protocols (with and/or without PEC, depending on the selected option and as relevant to the specific protocol). A transaction will be highlighted as No protocol match error if one of the following occurs:

  • A matching SMBus protocol was not found
  • A matching SMBus protocol with PEC was found but PEC is incorrect.

 

Address Resolution Protocol (ARP) commands will be decoded further.

Additional information can be obtained by clicking on the transaction-level record and looking at the Info pane. The Info pane will show the parsed fields for each matched SMBus protocol. It will also display error information for a few other possible SMBus protocols.

 

Transaction-level parsing for SMBus.

 

SMBus Class Records

Class-level records will display information relevant to the device class, as seen in the example below. Class-level information will be available for devices under one of the following conditions:

  • Class-level decoding option is selected in the I2C Device Configuration Manager Dialog for the device.
  • Use default SMBus device address assignment option is selected in the I2C Bus Configuration Manager Dialog and the device has one of the purpose-assigned slave addresses.
  • Device has one of the fixed addresses: SMBus Host or SMBus Device Default Address.

 

Class-level parsing for SMBus. 

To see an example of SMBus decoding in the Data Center Software, click File > Examples, choose the i2c-smbus-battery.tdc file, and click OK.

Reading and Writing SMBus Messages

The Aardvark I2C/SPI Host Adapter and Promira Serial Platform can both emulate an SMBus master to issue read and write commands. The GPIO function can be used for the SMBALERT# signal if needed.

These tools cannot act as an active slave because it can only respond with one message at a given time.

Users looking to use the host adapters as SMBus master devices can do so as they would for the I2C protocol. Control Center Serial Software can be used for quick tests, while the Aardvark Software API and Promira Software API I2C/SPI Active can be used for more advanced SMBus applications. 

SMBus Commands 

There is no exhaustive list of commands that can be tested. Any general command format can be sent over the bus using our tools and the response can be validated. These tools, however, are not considered to be compliance testers.

Monitoring PMBus

Unlike SMBus, the Data Center Software does not include PMBus decoding. However, users can monitor the I2C portion of the PMBus protocol by connecting the lines directly to Beagle I2C/SPI Protocol Analyzer and using Data Center Software to capture and view the trace data. If more control over the capture or decoding is needed, then the Beagle Software API can be used to write custom capture/decode software. The CONTROL and SMBALERT# lines cannot be monitored.

Reading and Writing PMBus Messages

By using the Aardvark I2C/SPI Host Adapter or Promira Serial Platform, users can write or read PMBus messages. These tools support everything except for alerts. However, users would need to implement specific PMBus commands themselves.

While we have not tested this, nor are we affiliated, this sample CLI from PmBusOrg on Github may be helpful in getting started.