Note: This article contains block design and c code for setting BRAM voltage to 0.55V via PMBus. You can find source files at the end of the article. To understand better what code does please read “UCD92xx Digital PWM System Controller PMBus Command Reference” and “PMBus™ Power System Management Protocol Specification Part II”. The article that you will about to read is mostly copied from above standards.
Another important note: This is a supplementary document. I am not responsible for your board’s health but YOU ARE. Please read carefully the standards and always question what I wrote. If there is a mistake please inform me.
The ZC702 board uses power regulators and a PMBus compliant system controller from Texas Instruments to supply core and auxiliary voltages to the Zynq 7000 APSoC.There are 5 switching regulators (PTD08D210W) and 1 linear regulator which generate different voltages required for the Zynq-7000 APSoC as well as the on-board components present on the ZC702 board. The voltage and currents supplied by these voltage regulators are continuously measured and monitored by three Texas Instruments digital power controllers (UCD9248) available on the ZC702 board. The Zynq7000 uses PMBus protocol to communicate with the power controllers over I2C bus connected to the I2C interface of the Zynq Processing system.
Note: DC/DC converter that stabilizes the voltage is often referred to as a voltage regulator. Linear regulator is a linear component (such as a resistive load) used to regulate the output. It has a simple design but low efficiency. On the other hand, a switching regulator is a voltage regulator that uses a switching element to transform the incoming power supply into a pulsed voltage, which is then smoothed using capacitors, inductors, and other elements. It is complicated but efficient.
- Data Formats
1.1. Data Format for Output Voltage Parameters
For parameters related to output voltage, the UCD9248 supports Linear16 format. Linear Data Format is typically used for commanding and reporting the parameters. The linear format uses a 16-bit unsigned mantissa for each parameter, along with an exponent that is shared by all the voltage-related parameters. The exponent is reported in the bottom 5 bits of the VOUT_MODE parameter. In the UCD92xx, this exponent is a read-only parameter whose value is fixed at –12. This allows setting voltage-related variables over a range from 0 to 15.9997V, with a resolution of 0.244mV.
The voltage value is calculated using the equation Voltage = V × 2^N,
where
Voltage is the parameter of interest, in volts,
V is a 16-bit unsigned binary integer mantissa, and
N is the signed 5-bit twos-complement binary integer exponent from VOUT_MODE.
1.2. Data Format for Other Parameters
For parameters do not directly related to output voltage, the UCD92xx supports the Linear11 Data Format. This linear format is a two-byte value that contains an 11-bit, twos-complement mantissa and a 5-bit, twos-complement exponent. The relationship between the PMBus parameter and the real world value is given by the formula:
R = Y × 2^X,
Where
R is the real world value,
Y is an 11-bit, signed 2s-complement binary integer mantissa, and
X is the signed 5-bit twos-complement binary integer exponent.
Attention: The internal variables used by the UCD92xx are often scaled to take optimal advantage of the hardware’s native units such as ADC or DAC counts rather than volts or amperes. As a result, values that are written and read via PMBus must undergo mathematical translations. These translations, with their inherent quantization, may result in very slight differences between the setting that was written to the UCD92xx and the value that was later read back from it.
2.Some Important PMBus Core Commands
2.1. (00h) PAGE
(Transaction Type: R/W Byte Data Format: Byte Scope: Common)
The PAGE command provides the ability to configure, control, and monitor multiple outputs on one unit using a single PMBus physical address. All subsequent commands that depend on page will be applied to rail selected by the PAGE command. Rails are numbered starting with one, while pages are numbered starting at zero. Rail simply refers to the supply voltage wiring for an electronics circuit.
Power controllers, regulators and also rails are depicted on Figure 1. For example Power Controller 1 (Core) has an address 52 decimal. It controls 4 power rails in terms of voltage and current.
Rails are numbered starting with one, while pages are numbered starting with zero. The relationship between the PMBus PAGE value and the Output Rail number is shown below.
2.2 (01h) OPERATION
(Transaction Type: R/W Byte Data Format: Byte Scope: PAGE)
The OPERATION command is used to turn the unit on and off in conjunction with the input from the CONTROL pin. It is also used to cause the unit to set the output voltage to the upper or lower MARGIN VOLTAGEs. The unit stays in the commanded operating mode until a subsequent OPERATION command or change in the state of CONTROL pin instructs the device to change to another node mode.
Bits [7:6] determine how the device responds when commanded to turn the output off via the OPERATION commands. If bits [7:6] are 00b, then the device turns off immediately and ignores any programmed turn-off delay and fall time. If bits [7:6] are 01b, the device powers down according to the programmed turn-off delay and fall time. Any value not shown in the table is an invalid command.
In the table below, “Act On Fault” means that if an output overvoltage warning or output overvoltage fault is detected when the output is margined high, the unit treats this as a warning or fault and responds as programmed by the warning limit or fault response command. The same goes for undervoltage.
“Ignore Fault” means that if an output overvoltage warning or output voltage fault is detected when the output is margined high, the unit ignores the condition and continues to operate without interruption or notification that a fault or warning condition has occured.The same goes for undervoltage.
If a device receives a data byte that is not listed in above table, then the device shall treat this is an invalid data and declare a communications fault.
2.3. (20h) VOUT_MODE
(Transaction Type: R/W Byte Data Format: Linear16 Scope: PAGE)
In the UCD92xx, VOUT_MODE is a read-only parameter that is fixed to use Linear data format, with a fixed scaling exponent of –12.
2.4. (21h) VOUT_COMMAND
(Transaction Type: R/W Word Data Format: Linear16 Scope: PAGE)
VOUT_COMMAND is used to set the voltage to which the device should set the output.
2.4. (23h) VOUT_CAL_OFFSET
(Transaction Type: R/W Byte Data Format: Linear16 Scope: PAGE)
The VOUT_CAL_OFFSET command is used to apply a fixed offset voltage to the output voltage command value. It is most typically be used by the PMBus device manufacturer to adjust the output voltage in their factory. he data bytes are 2’s complement two bytes formatted according the setting of the VOUT_MODE command which is fixed for our case as stated above.
2.5 (24h) VOUT_MAX
(Transaction Type: R/W Word Data Format: Linear16 Scope: PAGE)
The VOUT_MAX command sets an upper limit on the output voltage the unit can command regardless of any other commands or combinations. The intent of this command is to provide a safeguard against a user accidentally setting the output voltage to possibly destructive level rather than to be the primary output overprotection. We can set VOUT_MAX values to shutdown thresholds highlighted below table.
2.4. (25h) VOUT_MARGIN_HIGH
(Transaction Type: R/W Word Data Format: Linear16 Scope: PAGE)
This VOUT_MARGIN_HIGH command loads the unit with the voltage to which the output is to be changed when the OPERATION command is set to “Margin High”. The data bytes are two bytes formatted according the setting of the VOUT_MODE command which is fixed for our case as stated above.
2.5. (26h) VOUT_MARGIN_LOW
(Transaction Type: R/W Word Data Format: Linear16 Scope: PAGE)
This VOUT_MARGIN_LOW command loads the unit with the voltage to which the output is to be changed when the OPERATION command is set to “Margin Low”. The data bytes are two bytes formatted according the setting of the VOUT_MODE command which is fixed for our case as stated above.
3. Setting The Output Voltage
There are several commands that are used in commanding the output voltage of a device with PMBus interface. Below figure shows a conceptual view of how these commands are used to control the output voltage.
- The process of setting the output voltage starts with three basic commands for output voltage: VOUT_COMMAND, VOUT_MARGIN_HIGH and VOUT_MARGIN_LOW. One of these three values is selected by the OPERATION command and passed on to the rest of the output voltage command processing.
- The next step is to add the value in the VOUT_TRIM register to the output of the conceptual multiplexer. The value in the VOUT_TRIM register is 2’s complement so it can be negative. NOT SUPPORTED for our board or more specifically UCD92xx.
- Next, the value from VOUT_CAL_OFFSET register is added. This is also a 2’s complement number.
- Next, if the PMBus device has an output voltage droop characteristic, it is applied. VOUT_DROOP coefficients are always greater or equal to 0. The value of the VOUT_DROOP coefficient and the value of output current are multiplied and result is always subtracted from the voltage command. NOT SUPPORTED for our board or more specifically UCD92xx.
- The next step is to compare voltage commanded voltage developed so far with the maximum permissible output voltage set by the VOUT_MAX. If the calculated voltage command would create an output voltage greater than the VOUT_MAX value, the PMBus device limits the command voltage passed to the controller to the VOUT_MAX value.
- The next step is to apply the same scaling factor to the calculated voltage command as is applied to the external output voltage by a resistive divider. This is done by multiplying the calculated voltage command by VOUT_SCALE_LOOP.