XMC4000 Series for Industrial Applications

Power Management (PMBus) Host with XMC4000

Application Guide V1.0 2013-08

Microcontrollers

Edition 2013-08 Published by Infineon Technologies AG, 81726 Munich, Germany. © 2013 Infineon Technologies AG All Rights Reserved.

LEGAL DISCLAIMER THE INFORMATION GIVEN IN THIS APPLICATION NOTE IS GIVEN AS A HINT FOR THE IMPLEMENTATION OF THE INFINEON TECHNOLOGIES COMPONENT ONLY AND SHALL NOT BE REGARDED AS ANY DESCRIPTION OR WARRANTY OF A CERTAIN FUNCTIONALITY, CONDITION OR QUALITY OF THE INFINEON TECHNOLOGIES COMPONENT. THE RECIPIENT OF THIS APPLICATION NOTE MUST VERIFY ANY FUNCTION DESCRIBED HEREIN IN THE REAL APPLICATION. INFINEON TECHNOLOGIES HEREBY DISCLAIMS ANY AND ALL WARRANTIES AND LIABILITIES OF ANY KIND (INCLUDING WITHOUT LIMITATION WARRANTIES OF NON-INFRINGEMENT OF INTELLECTUAL PROPERTY RIGHTS OF ANY THIRD PARTY) WITH RESPECT TO ANY AND ALL INFORMATION GIVEN IN THIS APPLICATION NOTE. Information For further information on technology, delivery terms and conditions and prices, please contact the nearest Infineon Technologies Office (www.infineon.com). Warnings Due to technical requirements, components may contain dangerous substances. For information on the types in question, please contact the nearest Infineon Technologies Office. Infineon Technologies components may be used in life-support devices or systems only with the express written approval of Infineon Technologies, if a failure of such components can reasonably be expected to cause the failure of that life-support device or system or to affect the safety or effectiveness of that device or system. Life support devices or systems are intended to be implanted in the human body or to support and/or maintain and sustain and/or protect human life. If they fail, it is reasonable to assume that the health of the user or other persons may be endangered. Power Management Bus (PMBus) Host with XMC4000

Trademarks of Infineon Technologies AG AURIX™, C166™, CanPAK™, CIPOS™, CIPURSE™, EconoPACK™, CoolMOS™, CoolSET™, CORECONTROL™, CROSSAVE™, DAVE™, DI-POL™, EasyPIM™, EconoBRIDGE™, EconoDUAL™, EconoPIM™, EconoPACK™, EiceDRIVER™, eupec™, FCOS™, HITFET™, HybridPACK™, I²RF™, ISOFACE™, IsoPACK™, MIPAQ™, ModSTACK™, my-d™, NovalithIC™, OptiMOS™, ORIGA™, POWERCODE™; PRIMARION™, PrimePACK™, PrimeSTACK™, PRO-SIL™, PROFET™, RASIC™, ReverSave™, SatRIC™, SIEGET™, SINDRION™, SIPMOS™, SmartLEWIS™, SOLID FLASH™, TEMPFET™, thinQ!™, TRENCHSTOP™, TriCore™. Other Trademarks Advance Design System™ (ADS) of Agilent Technologies, AMBA™, ARM™, MULTI-ICE™, KEIL™, PRIMECELL™, REALVIEW™, THUMB™, µVision™ of ARM Limited, UK. AUTOSAR™ is licensed by AUTOSAR development partnership. Bluetooth™ of Bluetooth SIG Inc. CAT-iq™ of DECT Forum. COLOSSUS™, FirstGPS™ of Trimble Navigation Ltd. EMV™ of EMVCo, LLC (Visa Holdings Inc.). EPCOS™ of Epcos AG. FLEXGO™ of Microsoft Corporation. FlexRay™ is licensed by FlexRay Consortium. HYPERTERMINAL™ of Hilgraeve Incorporated. IEC™ of Commission Electrotechnique Internationale. IrDA™ of Infrared Data Association Corporation. ISO™ of INTERNATIONAL ORGANIZATION FOR STANDARDIZATION. MATLAB™ of MathWorks, Inc. MAXIM™ of Maxim Integrated Products, Inc. MICROTEC™, NUCLEUS™ of Mentor Graphics Corporation. MIPI™ of MIPI Alliance, Inc. MIPS™ of MIPS Technologies, Inc., USA. muRata™ of MURATA MANUFACTURING CO., MICROWAVE OFFICE™ (MWO) of Applied Wave Research Inc., OmniVision™ of OmniVision Technologies, Inc. Openwave™ Openwave Systems Inc. RED HAT™ Red Hat, Inc. RFMD™ RF Micro Devices, Inc. SIRIUS™ of Sirius Satellite Radio Inc. SOLARIS™ of Sun Microsystems, Inc. SPANSION™ of Spansion LLC Ltd. Symbian™ of Symbian Software Limited. TAIYO YUDEN™ of Taiyo Yuden Co. TEAKLITE™ of CEVA, Inc. TEKTRONIX™ of Tektronix Inc. TOKO™ of TOKO KABUSHIKI KAISHA TA. UNIX™ of X/Open Company Limited. VERILOG™, PALLADIUM™ of Cadence Design Systems, Inc. VLYNQ™ of Texas Instruments Incorporated. VXWORKS™, WIND RIVER™ of WIND RIVER SYSTEMS, INC. ZETEX™ of Diodes Zetex Limited. Last Trademarks Update 2011-11-11

Application Guide 3 V1.0, 2013-08

Power Management Bus (PMBus) Host with XMC4000

Revision History Major changes since previous revision Date Version Changed By Change Description

We Listen to Your Comments Is there any information in this document that you feel is wrong, unclear or missing? Your feedback will help us to continuously improve the quality of our documentation. Please send your proposal (including a reference to this document title/number) to: [email protected]

Application Guide 4 V1.0, 2013-08

Power Management Bus (PMBus) Host with XMC4000

Table of Contents

Revision History ...... 4 Table of Contents ...... 5 1 Overview ...... 6 1.1 System Overview ...... 6 1.2 PMBus Features...... 7 1.3 PMBus Protocols ...... 7 1.3.1 Send Byte ...... 8 1.3.2 Write Byte ...... 8 1.3.3 Write Word ...... 9 1.3.4 Read Byte ...... 9 1.3.5 Read Word ...... 10 1.3.6 Host Notify ...... 10 1.4 PMBus Commands and Data Formats ...... 11 2 Implementation of PMBus Host on XMC4400 ...... 12 2.1 Hardware ...... 13 2.2 Software ...... 14 2.2.1 Software Flow ...... 15 2.2.2 Packet Error Checking (PEC) ...... 15 2.2.3 Fault Reporting Mechanism ...... 16 2.3 xSPY ...... 16 2.3.1 Setup ...... 16 2.3.2 Examples of sending commands ...... 18 3 Software Package for PMBus Host ...... 22 4 Conclusion ...... 23 5 References ...... 24

Application Guide 5 V1.0, 2013-08 Power Management Bus (PMBus) Host with XMC4000

Overview

1 Overview

The Power Management Bus (PMBus™) is a free and open standard power-management protocol with a fully defined command language that facilitates communication with power converters and other devices in a power system. It is a variant of (SMBus), and is a relatively slow speed, two-wire communications protocol based on the Inter-Integrated Circuit Bus (I²C). The PMBus standard defines over two hundred commands, and a substantial number of the commands are specifically for power conversion processes. This application guide gives details of the PMBus standard and describes the implementation of the protocol on the Host Device using the Infineon XMC4400 microcontroller. The XMC4400 microcontroller belongs to the XMC4000 industrial family, which is based on the ARM Cortex-M4 processor core. The Universal Serial Interface Channel module (USIC) contained in the microcontroller is a flexible interface module covering several protocols including the Inter-Integrated Circuit (I²C).

1.1 System Overview

PMBus consists of a single host and multiple devices. It is a two-line communication protocol based on I²C. There are two optional lines, SMBALERT and CONTROL line.

Figure 1 PMBus communication architecture

Note: The SMBALERT# and CONTROL signals are optional to the operation of PMBus system. The PMBus 2 system can function with the two serial bus lines (I C).

Application Guide 6 V1.0, 2013-08 Power Management Bus (PMBus) Host with XMC4000

Overview

2 I C Serial Bus line 2 The Serial Bus Data and Serial Bus Clock line perform I C functions. These two are essential lines for the PMBus functionality.

SMBALERT# Signal The SMBALERT signal line is a an interrupt line for slave-only devices to notify the Host. The Slave can signal the Host through the SMBALERT line when a fault occurs and has to be reported. The Host will process the interrupt and access all the SMBALERT# devices using Alert Response Address and the devices that assert the signal will respond to the alert response address.

CONTROL Signal The CONTROL signal is an output signal on a PMBus Host. It can use this signal in conjunction with commands via the serial bus to turn the Slave Device on or off.

1.2 PMBus Features

The following features are recommended to improve the communication and data reliability, to create a robust PMBus system.

Fault Reporting The Slave Device is required to report the fault conditions to the Host during operation. The report can be via;  the SMBALERT# signal  using the host-notify protocol (section 1.3.6).

Packet Error Checking (PEC) An optional Packet Error Checking (PEC) feature is recommended, in order to significantly increase the data reliability. PEC checks the reliability of the received data packets via a cyclic redundancy check-8 (CRC-8) algorithm.

1.3 PMBus Protocols

In the XMC4000 implementation, the following types of PMBus command packet structures are supported:  Send Byte  Write Byte  Write Word  Read Byte  Read Word  Host Notify

Application Guide 7 V1.0, 2013-08 Power Management Bus (PMBus) Host with XMC4000

Overview

1.3.1 Send Byte

This is used by the Host (the PMBus master) to send a command to the Slave Device to perform simple tasks that do not require any data bytes. For example, the CLEAR_FAULTS command is used to clear all the fault flags in the system. The Host starts the communication by generating a start condition(S); write a 7 bit slave address with a write bit, followed by the 8 bit command. The Slave will acknowledge each byte received (shaded portion in the figure). The communication is terminated by a stop condition (P) generated by the Host. The additional PEC byte ensures data reliability.

Figure 2 Send Byte Packet without PEC

Figure 3 Send Byte Packet with PEC

1.3.2 Write Byte

Used by the Host to write a one-byte value to certain variables in Slave Device settings. For example, VOUT_MODE command can be used to change the voltage representation by writing a new variable value.

Figure 4 Write Byte Packet without PEC

Figure 5 Write Byte Packet with PEC

Application Guide 8 V1.0, 2013-08 Power Management Bus (PMBus) Host with XMC4000

Overview

1.3.3 Write Word

Used to write one word (2 bytes) of information into the Slave Device variable.

Figure 6 Write Word Packet without PEC

Figure 7 Write Word Packet with PEC

1.3.4 Read Byte

This is used by the Host to read one byte of information from the Slave Device. For example, the STATUS_BYTE command enables the Host to read the error status of the Slave Device. As shown in the figure, after the acknowledgement for command code from the Slave, the Host sends a repeated start (Sr) condition, followed by the 7-bit address with a read bit. The Slave will then acknowledge and send out one byte data.

Figure 8 Read Byte Packet without PEC

Figure 9 Read Byte Packet with PEC

Application Guide 9 V1.0, 2013-08 Power Management Bus (PMBus) Host with XMC4000

Overview

1.3.5 Read Word

Used for the Host to read one word of data from the PMBus Slave Device. For example, the READ_TEMPERATURE_1 command is used to read the temperature of the Slave Device.

Figure 10 Read Word Packet without PEC

Figure 11 Read Word Packet with PEC

1.3.6 Host Notify

When fault condition occurs in the Slave, the Slave needs to report the error back to the Host. In this case, the Slave Device becomes the bus master and initiates a communication session using the host notify protocol. The Slave Device address and two-byte status information are transmitted to the Host.

Figure 12 Host Notify Protocol

Application Guide 10 V1.0, 2013-08 Power Management Bus (PMBus) Host with XMC4000

Overview

1.4 PMBus Commands and Data Formats

The PMBus commands are one byte command codes. They consist of output voltage related commands, fault related commands, read status command and parametric write/read commands. With these commands the Host can configure the Slave Device peripherals and read the status. To support the write/read of the parametric data (except for output voltage), data is mainly represented in 2 types of format:  LINEAR  DIRECT For output voltage and output voltage related parameter, they are represented in three formats:  LINEAR scale using 2 bytes unsigned binary integer with a scaling factor.  VID codes used by INTEL microprocessor.  DIRECT format that uses an equation and the supplied coefficients. Each Slave Device is required to support one type of data format for each command supported. Not all the commands are required to be supported by PMBus systems, the command supported list should be determined according to application needs.

Application Guide 11 V1.0, 2013-08 Power Management Bus (PMBus) Host with XMC4000

Implementation of PMBus Host on XMC4400

2 Implementation of PMBus Host on XMC4400

Implementation focuses on the robust communication functionality. Table 1 is a list of implemented commands that are important to PMBus functionality.

Table 1 Commands Supported in the XMC4400 PMBus Host

Cmd Command Commands Name Data Format Description Code Packet Turn the Slave Device on/off with R/W Specification defined 01h OPERATION control signal, and set the output data format Byte voltage to margins. Send Clear any fault bits set in the 03h CLEAR_FAULTS No, write only Byte status registers. Copy the entire contents of the Send operating memory to the 11h STORE_DEFAULT_ALL No, write only Byte matching locations in the non- volatile Default Store memory. Copy the entire contents of the Send non-volatile Default Store memory 12h RESTORE_DEFAULT_ALL No, write only Byte to the matching locations in the operating memory.

Read Specification defined For Host system to determine 19h CAPABILITY some key capabilities of a PMBus Byte data format* Slave device. R/W Specification defined Set or read the format of the 20h VOUT_MODE Byte data format* output voltage data. LINEAR R/W Set the Slave Device output 21h VOUT_COMMAND (output voltage Word voltage. related)

R/W Specification defined Configure up to two fans 3Ah FAN_CONFIG_1_2 associated with one PMBus Slave Byte data format* Device. R/W 3Bh FAN_COMMAND_1 LINEAR Set the operation of the fan. Word Set the VIN overvoltage value R/W The VIN overvoltage fault is 55h VIN_OV_FAULT_LIMIT LINEAR Word reported if the input voltage is above this value.

R/W Specification defined Instruct the Slave on the action to 56h VIN_OV_FAULT_RESPONSE take in response to an input Byte data format* overvoltage fault. R/W Set the VIN under voltage value 58h VIN_UV_WARN_LIMIT LINEAR Word warning limit.

R/W Specification defined Instruct the Slave on the action to 5Ah VIN_UV_FAULT_RESPONSE take in response to an input under Byte data format* voltage fault. 78h STATUS_BYTE R/W Specification defined Slave Device to return one byte of

Application Guide 12 V1.0, 2013-08 Power Management Bus (PMBus) Host with XMC4000

Implementation of PMBus Host on XMC4400

Cmd Command Commands Name Data Format Description Code Packet Byte data format* information with a summary of the most critical faults. Slave Device to return two bytes R/W Specification defined 79h STATUS_WORD of information with a summary of data format* Word the Slave Device’s fault condition. Slave Device to return one byte of R/W Specification defined 7Ch STATUS_INPUT information with input related data format* Byte faults. Slave Device to return one byte of R/W Specification defined 7Eh STATUS_CML information with communication, data format* Byte logic and memory related faults. Slave Device to report on the R/W Specification defined 81h STATUS_FAN_1_2 status of any fans installed in data format* Byte position 1 or position 2. Read Slave Device to return the input 88h READ_VIN LINEAR Word voltage. Slave Device to return the actual, Read LINEAR (output 8Bh READ_VOUT measured (not commanded) voltage related) Word output voltage.

Read Slave Device to return the 8Dh READ_TEMPERATURE_1 LINEAR measured temperature in degree Word Celsius. * Please refer to the PMBus Power System Management Protocol Specification, Part II, for the detailed data format defined. In this solution;  The CONTROL line and the SMALERT# signal are not implemented  The linear data format is used  Linear 11 data format is used for general parameters  Linear 16 data format is used for output voltage related parameters The data format should be chosen according to the application requirements. The functions for direct data format conversion are implemented as API functions. The user can call these functions to convert the data to/from direct format. A Packet error checking function is supported. This is enabled or disabled in the configuration file, config.h.

2.1 Hardware

2 2 The PMBus is operated with the I C clock and the I C data lines. The CPU board used is the XMC4400 General Purpose Hexagon board, CPU_44A-V2. The XMC4400 has the USIC module which can support I2C communication.

2 Table 2 Possible I C Clock/Data hardware pin assignments in XMC4400

Clock SCL Data SDA P0.11 P0.5 / P2.14 P2.4 P2.5

Application Guide 13 V1.0, 2013-08 Power Management Bus (PMBus) Host with XMC4000

Implementation of PMBus Host on XMC4400

Clock SCL Data SDA P3.0 P2.5 In this example;  P0.11 is used for I2C SCL  P2.14 is used for the I2C Data

2.2 Software Here we describe the layers of functions in the software stack.

Figure 13 Software Layers

I2C Transport Layer TM Implemented using the existing DAVE Apps. Functions:  writes the value into the transmit buffer  reads the value from the receive buffer

PMBus Protocol Layer This layer configures the different protocols used by the PMBus commands. It configures the content and the sequence of the data for the communication, and performs the communication fault check.

Application Layer Here users can issue the command and configure the command data return. For example, to read the input voltage of the Slave Device, the user can issue the command READ_VIN in xSPY. This command is sent to the Host system:  The application layer of the Host system translates the command into PMBus protocol. 2  The protocol is translated into I C communication in the PMBus protocol layer. 2  The command is transmitted to the PMBus Slave Device through the I C transport layer.

Application Guide 14 V1.0, 2013-08 Power Management Bus (PMBus) Host with XMC4000

Implementation of PMBus Host on XMC4400

On the Slave side, after receiving the command code from the Host:  The command code is translated to PMBus protocols. In this example, input voltage information is required and the application layer will obtain the information in the system and pass the information to the PMBus protocol layer. 2  The PMBus protocol layer configures the information into appropriate forms and passes it to the I C transport layer.

2.2.1 Software Flow

Figure 14 PMBus Host general software flow

When a user enters a command in the xSPY, the system will decode the command into the PMBus protocol. 2 The respective data is written into the I C transmit buffer according to the protocol packet format. If the command is a write action, the system will go back to IDLE because all the actions are finished. If the command is a read action, the system will go into a wait state to wait for the data to be received from the Slave. After the system receives the data and finishes the required actions, the system will go back to IDLE state and wait for other commands.

2.2.2 Packet Error Checking (PEC)

The PEC byte is used to ensure the data reliability of the communication. It is calculated with all the data bytes in the communication, including the Slave address and the read/write bit. The PEC uses an 8-bit cyclic 8 2 redundancy check (CRC-8). The polynomial used is C(x) = x + x + x + 1.

Application Guide 15 V1.0, 2013-08 Power Management Bus (PMBus) Host with XMC4000

Implementation of PMBus Host on XMC4400

2.2.3 Fault Reporting Mechanism

When faults happen in the system, besides the default handling of the situation of the Slave, it will also use a fault reporting mechanism to notify the Host. Reporting is via either:  SMBALERT  Host notify protocol SMBALERT requires an additional signal line connection between the Host and Slave Devices. In addition the Host will need to send read status command with Alert Response Address to determine which Slave Device pulled the alert line and the type of fault that has occurred. Host notify protocol is used to save on hardware connection, and also to ease reporting procedures.

2.3 xSPY

TM TM xSPY is a plug-in for DAVE . Together with the DAVE App DBG002, it provides a means to modify and read variables on demand from a PC dashboard. xSPY allows the user to set the PMBus command and for data to be sent to the Slave Device.

2.3.1 Setup

For the installation of the xSPY plug-in, please refer to xSPY Getting Started document [5].

Setting the DBG002 App Open the GUI of the DBG002 App.  In the ‘UART Configuration’ tab, set the baud rate to 1MBit/s.  In the manual pin assignment, assign the: − transmit pin to Port 1.7 − receive pin to Port1.5

Code Modification in Main.c Declare the variables for tracing in the Variable Table, AppVarTable[]. DBG002_VariableDescriptionType AppVarTable[20] = { XSPY_ADD_UINT8("xSPYCmdReady", bxSPYCmdReady), XSPY_ADD_UINT8("Slave Address:1:hex",SlaveAddress), XSPY_ADD_UINT8("CmdRead:1:hex:",bCmdRead), XSPY_ADD_UINT8("ubCommandRx:1:hex:",ubCommandRx), XSPY_ADD_UINT8("CommandData0",ubCommandData[0]), XSPY_ADD_UINT8("CommandData1",ubCommandData[1]), XSPY_ADD_UINT8("Error Address:1:hex",ubErrorAddress), XSPY_ADD_UINT8("Error Condition0:1:hex ",ubErrorCondition[0]), XSPY_ADD_UINT8("Error Condition1:1:hex ",ubErrorCondition[1]), XSPY_ADD_UINT16("Status:1:hex:",uwStatus), XSPY_ADD_FLOAT("input",input),

Application Guide 16 V1.0, 2013-08 Power Management Bus (PMBus) Host with XMC4000

Implementation of PMBus Host on XMC4400

XSPY_ADD_FLOAT("Fan Speed",fFanSpeed), XSPY_ADD_FLOAT("Vout Setting",fVoutSetting), XSPY_ADD_FLOAT("Vin OV Fault",fVinOVFault), XSPY_ADD_FLOAT("Vin UV Warning",fVinUVWarn), XSPY_ADD_FLOAT("Temperature",fTemperature), XSPY_ADD_FLOAT("Vout Actual",fVoutActual), XSPY_ADD_FLOAT("Vin",fVin), XSPY_ADD_UINT8("readrxbyte0",ubRxData[0]), XSPY_ADD_UINT8("readrxbyte1",ubRxData[1]) }; Initialize the xSPY instance before the main loop function: DBG002_XspyInit(&XpyApp,AppVarTable,20,DBG002_GID_XSPY1); In the main loop function, the DBG002_XspyProcessCommand(&XpyApp) function is called to process the xSPY command: While(1) { … DBG002_XspyProcessCommand(&XpyApp); }

Control Page An xSPY control page is added to the project, PMBus_Host.xini.

Figure 15 xSPY Control Page

Application Guide 17 V1.0, 2013-08 Power Management Bus (PMBus) Host with XMC4000

Implementation of PMBus Host on XMC4400

2.3.2 Examples of sending commands

Examples of sending a read, write and status command.

Read Command The READ_VIN command is used to read the VIN values of the Slave Device. 1. Set PMBus Slave Device Address 2. In the ‘Command’ field, enter the command code 0x88 for Read Vin command 3. Set the ‘Read?’ to 1 for read operation. 4. Click on the ‘Set’ button to transmit the settings to the PMBus Host. 5. Click on the ‘Send Cmd’ button, to start the sending of the PMBus command to the PMBus Slave Device. 6. To update the VIN value on xSPY, click on the ‘Get’ button in the ‘Slave Device Data’ frame. 7. The updated VIN value is displayed.

Figure 16 READ_VIN Command

Application Guide 18 V1.0, 2013-08 Power Management Bus (PMBus) Host with XMC4000

Implementation of PMBus Host on XMC4400

Write Command The FAN_COMMAND_1 is used to set the FAN speed. 1. Set PMBus Slave Device Address 2. In the ‘Command’ field, enter the command code 0x3B for FAN_COMMAND_1. 3. Set the ‘Read ?’ field to 0 for write operation. 4. Set the ‘Input’ to 50.0, to set the fan speed to 50rpm. 5. Click on the ‘Set’ button to transmit the settings to the PMBus Host. 6. Click on the ‘Send Cmd’ button, to start the sending of the PMBus command to the PMBus Slave Device. 7. To check the Slave Device fan setting, send the FAN_COMMAND_1 command again with read operation. The Fan Speed in the ‘Slave Device Data’ frame will be updated with new fan speed value.

Figure 17 FAN_COMMAND_1 Command

Figure 18 Read back the setting of the FAN Speed.

Application Guide 19 V1.0, 2013-08 Power Management Bus (PMBus) Host with XMC4000

Implementation of PMBus Host on XMC4400

Status Command This STATUS_WORD command is sent to the Slave Device to monitor its status. The two data bytes of information returned give the Host a summary of the Slave fault condition. In this example, the returned information indicates that the Slave is powered off. 1. Set PMBus Slave Device Address 2. In the ‘Command’ field, enter the command code 0x79 for Status Word command 3. Set the ‘Read?’ to 1 for read operation. 4. Click on the ‘Set’ button to transmit the xSPY settings to the PMBus Host. 5. Click on the ‘Send Cmd’ button, to start the sending of the PMBus command to the PMBus Slave Device. 6. To update the status information on xSPY, click on the ‘Get’ button in the ‘Slave Device Data’ frame. 7. The updated status is displayed in the ‘Slave Device Status’ frame. It showed the PMBus Slave Device is powered off.

Figure 19 Status Word Command

Application Guide 20 V1.0, 2013-08 Power Management Bus (PMBus) Host with XMC4000

Implementation of PMBus Host on XMC4400

Host Notify Protocol If the PMBus Slave Device has a failure, it sends out a notice to the Host. The data bytes received from the Slave contain the same information as the STATUS_WORD command. In this example, the Slave has an input voltage fault. 1. Click on the ‘Get’ button in the ‘Slave Device Data’ frame. 2. The error information is updated and displayed in the ‘Slave Device Data’ frame and ‘Slave Device Status’ frame.

Figure 20 Host Notify Status

Application Guide 21 V1.0, 2013-08 Power Management Bus (PMBus) Host with XMC4000

Software Package for PMBus Host

3 Software Package for PMBus Host

TM Table 3 List of DAVE Apps used

Apps Version Description CLK001 1.0.32 Configure system and peripheral clock TM DAVESupport 1.0.32 DAVE Apps initialization and configure the multiplexer registers DBG001 1.0.8 Debug log app required for xSPY 2 I2C001 1.0.22 Configure one of the USIC channel as I C NVIC002 1.0.16 Interrupt handler apps RESET001 1.0.10 Provides API to assert/de-assert peripheral modules

TM Table 4 List of source files, excluding DAVE generated files

Filename Description Main.c The main tasks of this example project PMBUS001_HOST.c PMBus protocol layer functions implementation PMBUS001_GENERAL.c Functions related to data conversions and packet error checking CONFIG.h Configuration of the supported features PMBUS001_HOST.h PMBus commands definition and the PMBus protocol layer function declarations PMBUS001_GENERAL.h Function declarations defined in PMBUS001_GENERAL.c

Application Guide 22 V1.0, 2013-08 Power Management Bus (PMBus) Host with XMC4000

Conclusion

4 Conclusion

This application guide demonstrates the ease of creating a PMBus Host Device, using the general purpose port TM module, and using the USIC modules in the XMC4400 microcontroller. With the DAVE xSPY plug-in, it is possible to easily monitor and control the PMBus Slave Devices. The Infineon XMC4000 family of provide a great deal of flexibility for the creation of a wide variety of robust user applications.

Application Guide 23 V1.0, 2013-08 Power Management Bus (PMBus) Host with XMC4000

References

5 References

[1] XMC4400 Reference Manual, version 1.1, November 2012 [2] PMBus Power System Management Protocol Specification, revision 1.2, September 2010

[3] Power Management Bus Implementer’s Forum, PMBus™: The Power System Standard

[4] System Management Interface Forum, System Management Interface Forum (SMIF)

[5] xSPY Getting Started, version 1.0, http://www.infineon.com/XSPY

Application Guide 24 V1.0, 2013-08

www.infineon.com

Published by Infineon Technologies AG