Application Note 135 April 2012 Implementing Robust PMBus System Software for the LTC3880 Nick Vergunst INTRODUCTION commands because PMBus/SMBus provide timeouts to prevent bus hangups and optional packet error checking The LTC®3880 is a dual output PolyPhase® step-down DC/DC (PEC) to ensure data integrity. controller with integrated digital power system manage- ment. The LTC3880 can easily be controlled through a In general, a master device configured for I2C communi- PMBus interface, which builds upon I2C/IIC at speeds up cation is used for PMBus communication with little or no to 400kHz. System telemetry data can be obtained quickly change to hardware or firmware. Repeated starts (restarts) 2 and painlessly with simple polling functions. This exposes are not supported by all I C controllers but are required for 2 all important and critical information to the system devel- PMBus/SMBus reads. If a general purpose I C controller oper such as the voltage and current readings for the input is used, check that repeated starts are supported. and both outputs, temperature, fault conditions, general For a full description of the extensions and exceptions status information, and more. PMBus makes to SMBus, refer to PMBus Specification This application note discusses the design requirements Part 1 Revision 1.1: Paragraph 5: Transport. in regards to implementing robust firmware capable of For a full description of the differences between SMBus interacting with the LTC3880. and I2C, refer to System Management Bus (SMBus) Speci- fication Version 2.0: Appendix B—Differences Between 2 DOCUMENT OVERVIEW SMBus and I C. This document is broad in scope. If you already feel comfort- Quick Overview of PMBus vs SMBus vs I2C able with I2C/SMBus/PMBus and the transaction structure The power management bus (PMBus) protocol is built for the command set, then you may wish to skip ahead to upon the system management bus (SMBus) which builds the Communicating Robustly with the LTC3880 section. upon the 2-wire open drain communication interface inter- integrated circuit (I2C or IIC). REFERENCE DESIGN OVERVIEW PMBus dictates a maximum bus speed of 400kHz and has The PMBus master design used in this application note built-in timeouts important for critical systems. Though is an off-the-shelf microcontroller (Microchip PIC32MX), clock stretching is fully PMBus compliant, it is not required but any microcontroller, FPGA, or other device with a with the LTC3880 if operating at bus speeds at or below programmable PMBus/I2C interface can be used. All the 100kHz and the guidelines below are followed. Because code examples are written for the PIC32MX architecture, of the built-in timeouts, a minimum bus speed of 10kHz but they are easily adapted to other target designs. exists for all PMBus devices. Some of the key differences between PMBus and SMBus PMBus vs SMBus vs I2C/IIC INTRODUCTION in relation to the low level bus are: The power management bus (PMBus) 2-wire interface is • 400kHz maximum bus speed vs 100kHz SMBus limit an incremental extension of the system management bus • Group protocol (SMBus). SMBus is built upon I2C with some differences • Block reads up to 255 bytes in length vs 32 byte SMBus in timing, DC parameters, and protocol. The PMBus/ limit 2 L, LT, LTC, LTM, Linear Technology, PolyPhase and the Linear logo are registered trademarks SMBus protocols are more robust than simple I C byte and LTpowerPlay is a trademark of Linear Technology Corporation. All other trademarks are the property of their respective owners. an135f AN135-1 Application Note 135 Multiple starts without stops (i.e. repeated starts) are used as per PMBus/SMBus specification. The host processor NOTE: The term endian or endianness refers to the shall have support for these features to read from PMBus ordering of individually addressable subcomponents products such as the LTC3880. within the representation of a larger data. These subcomponents can be bits, bytes, words, or an PMBus Transaction Formats arbitrary length block. PMBus has several transaction formats that should be The usual contrast is whether the most significant supported: send byte, write byte, write word, read byte, or least significant byte is ordered first —i.e. at the and read word. For full support it is recommended you also lowest byte address— within the larger data item. support the PMBus read block transaction (up to 255 bytes). A big-endian machine stores the most significant The read block transaction is used to read more than three byte first, and a little-endian machine stores the byte data streams such as the real time clock, fault log, and least significant byte first. In these standard forms, identification strings. Master devices should also support the bytes remain ordered by significance. non-SMBus defined PMBus group command protocol. Big-endian is similar to how numbers are written In addition, all of these transaction formats may include a in arabic numerals. Given the number 5000 we packet error checking (PEC) byte at the end of the stream can break down the subcomponent to be a digit. to verify the validity of the data stream as a whole. Further we read this as big-endian style with the 5 being the most significant subcomponent giving us The required data ordering specifies the most significant five thousand. bit (MSb) of the least significant byte (LSB) is always sent first. This makes the byte order endianness little-endian To transmit 0xA1B2C3D4 in a big-endian system, and the bit order endianness big-endian. you would transfer 0xA1, then 0xB2, then 0xC3, and finally 0xD4. In a little-endian system like SMBus/ The eighth bit in the address byte indicates whether it PMBus you would transfer 0xD4, then 0xC3, then is a read (value of 1) or a write (value of 0). Anytime an 0xB2, and finally 0xA1. acknowledge is expected and not received, a communica- tion error has occurred and the transaction is cancelled. To transmit 0xA1 (0b10100001) in a big-endian bit order like SMBus/PMBus you would transfer 0b1 The gray sections in the PMBus sequence diagrams below first (followed by 0b0, 0b1, 0b0, 0b0, 0b0, 0b0, and indicates that the slave should be pulling the SDA line low 0b1). In a little-endian bit order it would be 0b1, 0b0, to acknowledge (ACK) receipt of the byte. 0b0, 0b0, 0b0, 0b1, 0b0, and then 0b1. PMBus Send Byte The send byte transaction is used to send a simple com- PMBus Write Byte mand to the device. A send byte transaction transfers a command with no data. The CLEAR_FAULTS command The write byte transaction is used to send single byte that clears the current fault flags present in the system is data to the LTC3880. The PAGE command that changes an example of such a command. the current page of the device is an example of this type of transaction. Similar to the send byte transaction above, A start bit, followed by the 7-bit slave address of the the series of start bit, 7-bit slave address of the LTC3880 LTC3880 and finished by a write bit (0-value) to indicate with write bit (0-value), command byte, and finally the a write make up the first stage of the transaction. If the 8-bit data byte. slave ACKs the address, then the host sends the 8-bit command followed by a stop condition. 117811 8 11 S SLAVE ADDRESS WrAAP COMMAND CODE A DATA BYTE 1711 8 11 AN135 F02 SAPSLAVE ADDRESS Wr A COMMAND CODE AN135 F01 Figure 2. PMBus Write Byte Figure 1. PMBus Send Byte an135f AN135-2 Application Note 135 PMBus Write Word PMBus Read Word The write word transaction is used to send a single word The read word transaction also starts out like a normal of data (two bytes) to the LTC3880. The VOUT_COMMAND I2C write transaction by sending the address and the write command is an example of such a transaction. Similar to bit. The second byte contains the command code, then a the write byte command, the only difference is that after repeated start is sent, and following that is the address and the third acknowledge (the low data byte), the high byte read bit signalling the device to return data for the speci- is sent in addition. fied command code. The slave responds by transmitting the value requested low byte first and high byte last. The PMBus Read Byte host acknowledges (ACK) the reception of the low byte The read byte starts out like a normal I2C write transac- and does not acknowledge (NACK) the high byte. tion by sending the address and the write bit. Sending a PMBus Read Block write bit for a read command can be somewhat confusing for a novice user. See Note regarding Reading PMBus/ The read block transaction is used to read a block stream SMBus. The second byte contains the command code, of data (up to 255 bytes) from the device. The MFR_ then a repeated start is sent, and following that is the FAULT_LOG command is an example of such a transaction. address and read bit signalling the device to return data Similar to the other read commands, but the first data for the specified command code. The slave responds by byte returned represents the byte count remaining for transmitting the byte value requested and the host does the block read. The host should then read the slave until not acknowledge (NACK) the data byte. The host NACKing byte-count data bytes are read in. The host acknowledges the data may be confusing initially, but it is defined that (ACK) the reception of all but the final byte and does not way to convey that the host is finished asking for data.
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages12 Page
-
File Size-