ST AN2511 APPLICATION NOTE

AN2511

Application note

PMBusTM interface using ST7 I2C

Introduction

The PMBusTM (power management bus) is an open standard protocol that defines a means of communicating with power conversion and other devices. The PMBus protocol helps to establish the first truly open communications standard for the digital control of power systems. Implemented over the industry-standard SMBus (system management bus) serial interface, the PMBus protocol facilitates the programming, control and real-time monitoring of compliant power conversion products.

This application note describes how to use the ST7 I2C peripheral for PMBus communication. The firmware of this application performs the PMBus bus protocols mentioned in PMBusTM power system management protocol specification v1.0. The device chosen here is ST72264G1 which has multi-master I2C capability. This microcontroller acts as the PMBus master. It controls the PMBus compatible slaves. The firmware described in this application note is in C language.

To show the PMBus capabilities of ST7, a dedicated demonstration board is developed. This board consists of the ST72F264G1 microcontroller and it works with PC hyperterminal. The objective of this demonstration board is to show to the user the features and capabilities of PMBus features using ST7 I2C peripheral, to support the standard PMBus commands. The results of this demonstration board interfaced with Artesyn's PMBus module are shown in this application note.

August 2010

Doc ID 13286 Rev 2

1/43

www.st.com

Contents

AN2511

 

 

Contents

1

PMBus introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

 

1.1 PMBus protocol description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6

1.1.1 SMBus version 1.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.1.2 Extensions to SMBus version 1.1 specification . . . . . . . . . . . . . . . . . . . . 6

1.2 Hardwired signals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6

1.2.1 Electrical interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 1.2.2 Timing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7

2

Implementation of PMBus using ST7 I2C . . . . . . . . . . . . . . . . . . . . . . . .

8

 

2.1 Firmware architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8

2.1.1 I2C initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.1.2 Slave address and command code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 2.1.3 Read and write operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3

PMBus commands and source code . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

 

3.1

PMBus commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11

 

3.2

Source code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

21

 

3.3

Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

22

 

3.4

Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

23

4

PMBus interfacing results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

 

4.1

Interfacing with Artesyn module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

24

 

4.2

Interfacing with SiLabs module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

25

5

PMBus demonstration board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27

 

5.1

System requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27

 

5.2

Software setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

27

 

5.3

Hardware setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

28

6

Using the demonstration board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

30

 

6.1

Normal operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

30

6.1.1 Selection of communication speed . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 6.1.2 Selection of packet error checking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30

2/43

Doc ID 13286 Rev 2

AN2511

Contents

 

 

6.1.3 Selection of slave address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 6.1.4 Selection of read/write mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 6.1.5 Single read mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 6.1.6 Continuous read mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 6.1.7 Write mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 6.1.8 Group command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

6.2 Error conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34

6.2.1 Invalid command code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 6.2.2 Communication timeout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35

7

Hardware description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

36

 

7.1

Schematic and layout . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

36

 

7.2

Bill of materials (BOM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

38

 

7.3

Demonstration board photo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

40

Appendix A Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

A.1 RS232 configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

Doc ID 13286 Rev 2

3/43

List of tables

AN2511

 

 

List of tables

Table 1. Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Table 2. ON_OFF_CONFIG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Table 3. CLEAR_FAULTS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Table 4. RESTORE_DEFAULT_ALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Table 5. STORE_USER_ALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Table 6. VOUT_MODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 Table 7. VOUT_COMMAND. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Table 8. VOUT_MAX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Table 9. VOUT_MARGIN_HIGH . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Table 10. VOUT_MARGIN_LOW . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Table 11. VOUT_OV_WARN_LIMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Table 12. VOUT_UV_WARN_LIMIT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Table 13. IOUT_OC_FAULT_LIMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Table 14. IOUT_OC_WARN_LIMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Table 15. OT_FAULT_LIMIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Table 16. OT_FAULT_RESPONSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Table 17. OT_WARN_LIMIT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Table 18. TON_DELAY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Table 19. TON_RISE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Table 20. TOFF_DELAY. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Table 21. TOFF_FALL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Table 22. STATUS_BYTE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Table 23. STATUS_WORD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Table 24. STATUS_VOUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Table 25. STATUS_IOUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Table 26. STATUS_TEMPERATURE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Table 27. STATUS_MFR_SPECIFIC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Table 28. READ_VOUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Table 29. READ_IOUT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Table 30. READ_TEMPERATURE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Table 31. PMBUS_REVISION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Table 32. MFR_ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Table 33. MFR_MODEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Table 34. MFR_REVISION. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Table 35. MFR_LOCATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Table 36. MFR_DATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Table 37. MFR_SERIAL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Table 38. MFR_SPECIFIC_00 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Table 39. MFR_SPECIFIC_01 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Table 40. MFR_SPECIFIC_02 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 Table 41. PMBus interfacing with Artesyn module: results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Table 42. PMBus interfacing with SiLabs module: results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Table 43. Bill of material . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 Table 44. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

4/43

Doc ID 13286 Rev 2

AN2511

List of figures

 

 

List of figures

Figure 1. Interface diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Figure 2. Flowchart: I2C initialization . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

Figure 3. Flowchart: data length calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Figure 4. Flowchart: read operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Figure 5. Flowchart: write operation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Figure 6. PC hyperterminal application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Figure 7. Baud rate configuration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Figure 8. Hyperterminal settings - ASCII setup configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Figure 9. Hyperterminal message to show company name and selection of communication speed 30 Figure 10. PEC selection . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Figure 11. Slave address entry message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Figure 12. Wrong slave address entry - response 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Figure 13. Wrong slave address entry - response 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Figure 14. Options to select read/ write mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Figure 15. Single read operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Figure 16. Continuous read operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Figure 17. Write mode command code entry message from hyperterminal . . . . . . . . . . . . . . . . . . . . 32 Figure 18. Write mode data entry message from hyperterminal . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Figure 19. Write mode operation example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Figure 20. Read operation to check data writing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Figure 21. Group command code entry message from hyperterminal. . . . . . . . . . . . . . . . . . . . . . . . . 34 Figure 22. Group command operation example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Figure 23. Invalid command message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Figure 24. Example of invalid command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Figure 25. Communication timeout message . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Figure 26. Demonstration board schematic . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 Figure 27. Top view layout of the demonstration board. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Figure 28. Bottom view layout of the demonstration board . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 Figure 29. STEVAL-ISQ002V1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 Figure 30. Pin description of RS232 D9 connector . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

Doc ID 13286 Rev 2

5/43

PMBus introduction

AN2511

 

 

1 PMBus introduction

1.1PMBus protocol description

The PMBus protocol is intended to cover a wide range of power system architectures and converters.

PMBus devices must use the system management bus (SMBus), version 1.1. Implemented over the industry-standard SMBus serial interface, the PMBus protocol facilitates the programming, control and real-time monitoring of compliant power conversion products.

1.1.1SMBus version 1.1

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.

For more information about SMBus, refer to AN1713, available from www.st.com.

1.1.2Extensions to SMBus version 1.1 specification

1.Block write-block-read process call

To support certain commands of the PMBus command language, PMBus devices must support the "Block write-block-read process call" described in Section 5.5.8 of Version 2.0 of the SMBus Specification.

2.Host notify protocol

PMBus devices may support the host notify protocol described in Section 5.5.9 of Version 2.0 of the SMBus Specification. If a PMBus device supports the host notify protocol, the two data bytes sent to the host are the same as the data bytes returned by the STATUS_WORD command.

3.Group command protocol

PMBus devices must support the group command protocol. The group command protocol is used to send commands to more than one PMBus device. The commands are received in one transmission. When the devices detect the STOP condition that ends the command, they all begin executing the command they received.

4.Addressing

PMBus devices use seven bit addresses.

5.Packet error checking (PEC)

Support for the SMBus packet error checking (PEC) protocol is optional.

1.2Hardwired signals

1.2.1Electrical interface

The following diagram shows the interface between different PMBus devices. ST72264G1 is the selected microcontroller, which has a multi-master I2C interface. This microcontroller acts as PMBus master. It communicates with any compatible PMBus slave using a 4-pin interface. SMBC is the clock from the master. SMBD is the data pin. Both SMBC and SMBD should be pulled up with a 4.7 kΩ resistor. SMBALERT is the SMBus alert pin, which helps

6/43

Doc ID 13286 Rev 2

AN2511

PMBus introduction

 

 

the slave to alert the master whenever it wants to communicate. The control pin is used to switch ON or OFF a PMBus slave.

Figure 1. Interface diagram

PMBus Master

PMBus Slave

(ST72F264G1)

SMBC (SCL) SMBC

SMBD (SDA) SMBD

SMBA (PA3) SMBA

CONTROL (PC0) CONTROL

The CONTROL signal is an input signal on a power converter. It is used to turn the unit on and off in conjunction with commands received via the serial bus. It can be configured as an active high or active low signal through the ON_OFF_CONFIG command (refer to

Section 3.1).

This signal is optional but recommended.

1.2.2Timing

No specific requirements are made when a PMBus device must respond to a state change of a hardwired signal.

Doc ID 13286 Rev 2

7/43

Implementation of PMBus using ST7 I2C

AN2511

 

 

2 Implementation of PMBus using ST7 I2C

2.1Firmware architecture

This section explains sequence of operation for different software modules.

2.1.1I2C initialization

To use ST7 I2C for PMBus communication, the peripheral is initialized for 100 kHz communication speed. The I2C is configured with an address of 0x30, as it can act as a slave due to its multi-master capability. The following flowchart shows the sequence.

Figure 2. Flowchart: I2C initialization

START

Initialize I2C CR, CCR,

OAR1 and OAR2 registers

Configure slave addresses in OAR1 and OAR2

Enable I2C peripheral and acknowledge in I2CCR register

Set communication speed as 100kHz in I2CCCR register

STOP

The above flowchart is implemented in the function PMBus_Init.

2.1.2Slave address and command code

The PMBus master addresses the slave with a 7-bit address. Once the slave device acknowledges the address, the command code is sent corresponding to the PMBus command and SMBus protocol (refer to Section 3.1).

Then, the microcontroller decodes the command code as shown in the following sequence. Simultaneously, the SMBus_Mode variable is updated.

8/43

Doc ID 13286 Rev 2

ST AN2511 APPLICATION NOTE

AN2511

Implementation of PMBus using ST7 I2C

 

 

Figure 3. Flowchart: data length calculation

START

Check if command code equal to Block protocol

No

Check if command code equal

to Byte protocol

No

Check if command code equal

to word protocol

No

Byte Count=6, Yes Update

SMBus_Mode for Block Command

Byte Count=1, Yes Update

SMBus_Mode for Byte Command

Byte Count=2, Yes Update

SMBus_Mode for Word Command

STOP

Inside both PMBus_CommandRead and PMBus_CommandWrite functions,

PMBus_DataLengthCalc is called which calculates the data length based on the command code received.

2.1.3Read and write operation

PMBus master performs read/ write operations with the slave device. Depending on the command code, either PMBus_CommandRead or PMBus_CommandWrite is called. Inside this function, the SMBus transaction type is selected as shown in the following sequence.

Figure 4. Flowchart: read operation

START

Check if SMBus_Mode for Byte command

Yes

SMBus Read byte protocol

1

7

1

1

8

1

1

7

1

1

8

1

1

 

 

 

 

 

 

 

 

 

 

 

 

 

S

Slave Address

Wr

A

Command Code

A

S

Slave Address

Rd

A

Data Byte

A

P

 

 

 

 

 

 

 

 

 

 

 

 

 

No

Check if SMBus_Mode for Word command

Yes

SMBus Read word protocol

1

7

1

1

8

1

1

7

1

1

8

1

 

S

Slave Address

Wr

A

Command Code

A

S

Slave Address

Rd

A

Data Byte Low

A

...

 

 

 

 

 

 

 

 

 

 

 

 

 

 

No

 

 

 

 

 

 

 

 

 

 

8

 

 

 

1

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Data Byte High

A

P

 

 

 

 

 

 

 

 

 

 

 

Check if SMBus_Mode for

 

 

Yes

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

SMBus Read block protocol

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Send Block command

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

7

 

1

1

8

1

1

 

 

 

7

 

1

1

 

 

8

1

 

 

No

S

Slave Address

Wr

A

Command Code

A

Sr

 

Slave Address

 

Rd

A

 

 

Count Byte = 1

A

...

STOP

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8

 

1

 

8

 

1

...

 

 

8

 

 

1

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Data Byte 1

 

A

 

Data Byte 2

 

 

A

...

Data Byte N

 

 

A

 

P

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Doc ID 13286 Rev 2

9/43

Implementation of PMBus using ST7 I2C

AN2511

 

 

Figure 5. Flowchart: write operation

START

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Check if SMBus_Mode for

 

Yes

SMBus Send byte protocol

 

 

 

 

 

 

 

 

 

Send Byte command

 

 

 

 

 

 

 

 

 

 

 

1

 

7

1

1

8

 

1

1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

S

Slave Address

Wr

A

Data Byte

 

A

P

 

 

 

 

 

 

 

No

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Check if SMBus_Mode for Write

 

Yes

SMBus Write byte protocol

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Byte command

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

7

1

1

8

 

1

 

8

 

1

1

 

 

 

 

S

Slave Address

Wr

A

Command Code

A

 

Data Byte

A

P

 

 

 

Check if SMBus_Mode for Write

 

Yes

SMBus Write word protocol

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Word command

1

 

7

1

1

8

 

1

 

8

 

1

 

8

1

1

 

 

 

 

 

 

 

S

Slave Address

Wr

A

Command Code

A

Data Byte Low

A

Data Byte HIgh

A

P

No

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Check if SMBus_Mode for

 

Yes

SMBus Write block protocol

 

 

 

 

 

 

 

 

 

Write Block command

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

1

 

7

1

1

8

 

1

 

8

 

1

1

8

 

1

No

S

Slave Address

Wr

A

Command Code

A

Byte Count = N

Rd

A

Data Byte 1

 

A ...

STOP

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

8

 

1 ...

 

8

 

1

1

 

 

 

 

 

 

 

 

Data Byte 2

A ...

Data Byte N

A

P

 

 

 

 

 

During the PMBus communication, if there are any errors in communication (acknowledge failure, arbitration loss, bus error or SMBus timeout), the I2C peripheral is disabled. It is reinitialized again inside the PMBus write/ read functions.

In case the SMBus Alert pin is pulled low by the slave to inform the master that it wants to communicate, the slave address is programmed with the alert response address (0x18). This is acknowledged by the slave that alerted the master. After the communication between the master and slave is complete, the slave address is programmed with the user-defined slave address. The default value of this user-defined address is 0x30.

In case of group operation, the write operation flowchart is followed without the stop condition.

10/43

Doc ID 13286 Rev 2

AN2511

PMBus commands and source code

 

 

3 PMBus commands and source code

3.1PMBus commands

The Part II - command language document of PMBus™ Power System Management Protocol Specification v1.0 provides the list of PMBus commands. This driver supports the following list of commands. For each command a table is given.

Table 1.

Operation

 

Command name

OPERATION

 

 

Command code

01h

 

 

 

 

 

The OPERATION command is used to turn the

Description

 

unit on and off in conjunction with the input from

 

 

the CONTROL (OUTEN) pin.

 

 

SMBus transaction type

Read/ Write byte

 

 

Number of data bytes

1

 

 

 

Table 2.

ON_OFF_CONFIG

 

Command name

ON_OFF_CONFIG

 

 

Command code

02h

 

 

 

 

 

The ON_OFF_CONFIG command configures the

Description

 

combination of CONTROL (OUTEN) pin input

 

and serial bus commands needed to turn the unit

 

 

 

 

on and off.

 

 

SMBus transaction type

Read/ Write byte

 

 

Number of data bytes

1

 

 

 

Table 3.

CLEAR_FAULTS

 

Command name

CLEAR_FAULTS

 

 

Command code

03h

 

 

 

Description

 

CLEAR_FAULTS is used to clear any fault bits

 

that have been set.

 

 

 

 

SMBus transaction type

Send byte

 

 

Number of data bytes

0

 

 

 

Doc ID 13286 Rev 2

11/43

PMBus commands and source code

AN2511

 

 

 

 

 

Table 4.

RESTORE_DEFAULT_ALL

 

 

 

 

 

Command name

RESTORE_DEFAULT_ALL

 

 

 

 

Command code

12h

 

 

 

 

 

 

 

The RESTORE_DEFAULT_ALL command

 

 

 

instructs the PMBus device to copy the entire

 

 

 

contents of the non-volatile default store memory

 

Description

 

to the matching locations in the operating

 

 

 

memory. Any items in default store that do not

 

 

 

have matching locations in the operating memory

 

 

 

are ignored.

 

 

 

 

SMBus transaction type

Send byte

 

 

 

 

Number of data bytes

0

 

 

 

 

 

Table 5.

STORE_USER_ALL

 

 

 

 

 

Command name

STORE_USER_ALL

 

 

 

 

Command code

15h

 

 

 

 

 

 

 

The STORE_USER_ALL command instructs the

 

 

 

PMBus device to copy the entire contents of the

 

Description

 

operating memory to the matching locations in

 

 

the non-volatile user store memory. Any items in

 

 

 

 

 

 

operating memory that do not have matching

 

 

 

locations in the user store are ignored.

 

 

 

 

SMBus transaction type

Send byte

 

 

 

 

Number of data bytes

0

 

 

 

 

 

Table 6.

VOUT_MODE

 

 

 

 

 

Command name

VOUT_MODE

 

 

 

 

Command code

20h

 

 

 

 

 

 

 

VOUT_MODE command, used for commanding

 

 

 

and reading output voltage, consists of a three bit

 

Description

 

mode (only linear format is supported.) and a

 

 

 

five-bit parameter representing the exponent

 

 

 

used in output voltage Read/Writes.

 

 

 

 

SMBus transaction type

Read/ Write byte

 

 

 

 

Number of data bytes

1

 

 

 

 

12/43

Doc ID 13286 Rev 2

AN2511

 

PMBus commands and source code

 

 

 

 

 

Table 7.

VOUT_COMMAND

 

 

 

 

 

Command name

VOUT_COMMAND

 

 

 

 

Command code

21h

 

 

 

 

 

Description

 

VOUT_COMMAND is used to set the output

 

 

voltage, in volts (linear format).

 

 

 

 

 

 

 

SMBus transaction type

Read/ Write word

 

 

 

 

Number of data bytes

2

 

 

 

 

 

Table 8.

VOUT_MAX

 

 

 

 

 

Command name

VOUT_MAX

 

 

 

 

Command code

24h

 

 

 

 

 

 

 

The VOUT_ MAX command sets an upper limit

 

Description

 

on the output voltage the unit can command

 

 

regardless of any other commands or

 

 

 

 

 

 

combinations.

 

 

 

 

SMBus transaction type

Read/ Write word

 

 

 

 

Number of data bytes

2

 

 

 

 

 

Table 9.

VOUT_MARGIN_HIGH

 

 

 

 

 

Command name

VOUT_MARGIN_HIGH

 

 

 

 

Command code

25h

 

 

 

 

 

 

 

This VOUT_MARGIN_HIGH command loads the

 

Description

 

unit with the voltage to which the output is to be

 

 

changed when the OPERATION command is set

 

 

 

 

 

 

to "Margin High".

 

 

 

 

SMBus transaction type

Read/ Write word

 

 

 

 

Number of data bytes

2

 

 

 

 

Table 10. VOUT_MARGIN_LOW

 

 

 

 

 

Command name

VOUT_MARGIN_LOW

 

 

 

 

Command code

26h

 

 

 

 

 

 

 

This VOUT_MARGIN_LOW command loads the

 

Description

 

unit with the voltage to which the output is to be

 

 

changed when the OPERATION command is set

 

 

 

 

 

 

to "Margin Low".

 

 

 

 

SMBus transaction type

Read/ Write word

 

 

 

 

Number of data bytes

2

 

 

 

 

Table 11. VOUT_OV_WARN_LIMIT

 

 

 

 

 

Command name

VOUT_OV_WARN_LIMIT

 

 

 

 

Command code

42h

 

 

 

 

Doc ID 13286 Rev 2

13/43

Loading...
+ 30 hidden pages