AN1713
APPLICATION NOTE
SMBus SLAVE DRIVER FOR ST7 I2C PERIPHERAL
by Microcontroller Division Applications
INTRODUCTION
The goal of this application note is to implement the SMBus slave protocol using ST7 I2C. The
software of this application performs all SMBus bus protocols mentioned in SMBus v1.1. The
device chosen here is ST72F264 which has multi-master I2C capability.
The program described in this application note is in C language. The driver is compatible with
Metrowerks and Cosmic compilers.
1 CHARACTERISTICS
The main characteristics of this SMBus slave driver are:
■ SMBus bus protocols: Quick command, Send/ Receive Byte, Write/ Read Byte, Write/ Read
Word, Write/ Read Block, Process Call Word/ Block
■ Slave SMBus addressing
■ CRC-8 Packet Error Checking
For more details please refer to the SMBus specification v1.1.
2 SMBus
The System Management Bus (SM Bus) i s a two-wire interface through which various system
component chips can communicate with each other and with the rest of the system. It is based
on the principles of operation of I2C.
2.1 Similarities of SMBus and I2C
■ 2 wire bus protocol (1 Clk, 1 Data)
■ Master-slave communication, Master provides clock
■ Multi master capability
■ SMBus data format similar to I2C 7-bit addressing format.
AN1713/0803 1/4
1
SMBus SLAVE DRIVER FOR ST7 I2C PERIPHERAL
Figure 1. Data transfer format
SMBDAT: SMBus data line
SMBCLK: SMBus clock line
2.2 Differences between SMBus and I2C
The following table describes the differences between SMBus and I2C.
Table 1. SMBus vs I2C
SMBus ST7 I2C
Max. speed 100 kHz Max. speed 400 kHz
Min. clock speed 10 kHz No minimum clock speed
35ms clock low time-out No time-out
Logic levels are fixed Logic levels are VDD dependent
Different address types (reserved, dynamic
etc.)
Different bus protocols (quick command, process call etc.)
Packet error checking (PEC) implemented
7-bit, 10-bit and general call slave address
types
No bus protocols
No packet error checking. Only error status
indication
2.3 SMBus Application
With Sy stem M anag ement B us, a devi ce c an pro vide manufa cture r inform ation, tell t he
system what its model/part number is, save its state for a suspend event, report different types
of errors, accept contr ol param eters, and r eturn its status. SMBus pr ovides a control bus for
system and power management related tasks.
2/4
2