ST AN1713 Application note

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 (SMBus) is 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

ST AN1713 Application note

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

7-bit, 10-bit and general call slave address

etc.)

types

 

 

Different bus protocols (quick command, proc-

No bus protocols

ess call etc.)

 

Packet error checking (PEC) implemented

No packet error checking. Only error status

indication

 

 

 

2.3 SMBus Application

With System Management Bus, a device can provide manufacturer information, tell the system what its model/part number is, save its state for a suspend event, report different types of errors, accept control parameters, and return its status. SMBus provides a control bus for system and power management related tasks.

2/4

Loading...
+ 2 hidden pages