An Overview of SMBus Functions

System Management Bus Protocol, also known as SMBus, is a two-wire protocol that supports basic communication functions, often within computer motherboards. Defined by Intel and Duracell in 1994, the standard has grown steadily in usage due to its functional benefits and compatibility with the existing I2C two-wire protocol. Today, the SMBus standard is maintained by technologists at the System Management Interface Forum, a forum for early adopters of communication protocols with a mission to support compatible technologies in power management.

In this week's blog post, we're taking a deep look at the SMBus protocol and its functions. We'll explain the features and five most basic functions of the protocol while paying special attention to the various types of messages that can be passed between master and slave devices using SMBus.

What is SMBus Protocol?

A serial communication protocol establishes a common language and syntax for communication between devices. Before we can understand the contents of the messages that pass between master and slave devices on the bus, we must first understand the underlying structure of the messages and their component parts.

Data transfers using the SMBus protocol originate from a master device. They begin with the establishment of a start condition, after which the master device transmits a 7-bit destination address for the data transfer. Messages on the bus can be addressed to one or more slave devices. Following the 7-bit slave address, a final bit of data is transmitted as part of the message. This may be known as the Read/Write Bit (Rd/Wr Bit), and while it does not form part of the slave address, it does serve some special functions in SMBus messages.

Next, the addressed slave devices respond with an ACK - an acknowledgement byte that indicates the original message was received. Once the master and slave devices have made contact in this way, a variety of additional functions become available. These, we will discuss in the section below.

Circuit Board

Image courtesy of Unsplash: Computer motherboards are a common use case for the SMBus protocol.

 

What Are the Main SMBus Functions?

SMBus functions may also be referred to as SMBus protocols. The most recent version of the System Management Bus (SMBus) Specification Version 3.0 outlined thirteen separate protocols for message transfer using SMBus. Below, we summarize the five main protocols of SMBus and describe how they are executed in interactions between master and slave devices.

Quick Command

A quick command is the simplest type of command that can be transmitted using SMBus. All of the information for the command is contained a single bit - either a 1 or a 0. To send a quick command, the master device generates a Start condition and addresses the command to the appropriate slave device(s) with a 7-bit address. The bit following the slave address, known as the Rd/Wr Bit, contains either a 1 or a 0 which may turn a device on or off, or enable/disable a device feature. When the command is received, the slave device sends an ACK bit to acknowledge as such and a Stop condition is generated by the master device.

Send Byte

To send a byte of data, the master first generates a start condition and addresses the message to a slave device. The Rd/Wr bit will have a value of 0, indicating to the slave that the master wants to send. Once an ACK bit is received, the master will send a single byte (8 bits of data) to the slave device. The byte may contain any of up to 256 encoded commands. Following the data transfer, the slave replies with an ACK bit and the master device will generate a Stop condition.

Receive Byte

Receiving a byte is essentially the opposite of sending a byte, and thus, many of the steps are identical. The main difference is that the Rd/Wr bit will contain a value of 1 indicating that the master device wants to receive data instead of send it. The slave will send an ACK bit, then transfer a byte of data from the slave to the master device. When the data byte is received, the master device will respond with a NACK bit before generating a Stop condition and ending the data transfer.

Write Byte

The write byte function begins in a familiar way, with the generation of a Start condition, slave addressing, and the Rd/Wr bit set to 0, indicating the master wants to write a message. Once the slave acknowledges the packet, two bytes will be sent by the master. The first one contains the command code and is followed by an ACK bit from the slave. The second byte will contain 8 bits of data, and will be followed by an ACK from the slave device before a Stop condition is generated by the master.

Read Byte

The read byte function makes use of a special SMBus protocol feature called a repeated Start condition. First, the master device creates a Start condition, then addresses the initial message using a 7-digit slave address. The Rd/Wr bit here is initially set to "Write" (0). Once the slave acknowledges the message, a command code is transmitted indicating that the master device wants to read data from the slave device - this is where things get tricky.

When the command code is acknowledged by the slave device, the master device generates a repeated Start condition and addresses the slave again - only this time, the Rd/Wr bit is set to Read (1). The master is now ready to read data from the slave. The slave will send an ACK bit and either one or two bytes of data. Once the transfer has concluded, the master device replies with a NACK bit and a Stop condition will be generated to terminate the transmission.

What other Functions are Supported in SMBus?

In addition to these basic five, there are eight more functions supported in the SMBus protocol:

  • Process Call- allows a command to send data to a slave and wait for the slave to return a value dependent on the data
  • Block Write/Read- allows the master to read or write large blocks of data, up to 20 bytes or more, from a slave device
  • Block Write-Block Read Process Call- a function that allows for the exchange of up to 255 total bytes of data between master and slave as part of a single function
  • SMBus Host Notify Protocol- enables communication with the SMBus host controller
  • Write 32 Protocol- A protocol for sending up to 32 bits of data from a master device to a slave device
  • Read 32 Protocol - A protocol for reading up to 32 bits of data from a slave device
  • Write 64 Protocol- A protocol for sending up to 64 bits of data from a master device to a slave device
  • Read 64 Protocol - A protocol for sending up to 64 bits of data from a master device to a slave device

Conclusion

SMBus has seen widespread adoption in basic electronics engineering due to its simplicity and low power consumption. For engineers building devices that use SMBus, Total Phase offers the Aardvark I2C/SPI Host Adapter and Beagle I2C/SPI Protocol Analyzer that are both capable for working with SMBus devices to help you save time and money as you build, test, and market your embedded electronic device.

Request a Demo