dm00682242 The Stpmic1 Ic Programming Guide Stmicroelectronics
dm00682242 The Stpmic1 Ic Programming Guide Stmicroelectronics
Application note
Introduction
This application note provides a detailed description of the programming function of the STPMIC1. It also describes the minimal
system requirements and instructions to program the NVM for a selected power-up configuration. All examples assume that the
customer uses any silicon review and has a base- knowledge of BUS I2C programming.
Figure 1. STEVAL-PMIC1x
1 General considerations
This section provides some detailed information about the STPMIC1 (re)program stand-alone function. It outlines
the system requirements and the instructions needed to (re)program the NVM content for a selected power-up
configuration.
The STPMIC1 has a non-volatile memory (NVM) that stores essential settings, which are applied to each startup
of the device. Programmability of the NVM allows the STPMIC1 to be fit to different use cases. User accessible
NVM content is:
- Default output voltages
- Power-up/down sequence
- Protection behavior
- I2C slave device address
- Auto turn-on and other various features (see the STPMIC1 datasheet for further details)
Three standard NVM configurations are available from the manufacturing company: the STPMIC1A, STPMIC1B
and STPMIC1C. The STPMIC1C is turned ON after applying the input voltage, but all output voltages are not
turned ON with Rank0 by default. To facilitate mass production, each of them can be re-programmed by I2C
directly into the target application. The procedure is being described below.
To access the I2C interface of the STPMIC1, a simple standard I2C, a USB adapter connected to the PC and a
terminal emulation software (Hyper Terminal, PuTTY, RealTerm, etc…) are enough.
The communication is still present even if the device is in stand-by mode or OFF mode and VIO voltage is
provided.
In this document, some examples of this procedure are described, using our USBSTICK I2C to a USB adapter
and the dedicated STPMIC1 GUI, directly addressing the registers and changing their content (using the general
tab or a dedicated tab of the GUI program).
In the final customer application, VIN, VIO and I2C BUS communication must be isolated by using solder shorts or
0 Ω resistors to switch between external programmer or the onboard micro-processor. However, minor rework of
the board is required once the NVM content is (re)programmed. Better, but more expensive if compared with the
solder shorts or 0 Ω resistor, is the use of a switch to isolate the I2C BUS.
SCL
SCL
Processor
STPMIC1
SCL Programmer
SDA Processor
SDA STPMIC1
SDAProgrammer
Processor/Programmer
SELECT
In the STPMIC1x demo board, the VIN, I2C BUS and VIO_EXT connectors are available, but you need to set the
J2 to use the header H16 to supply 3.3 VIO externally.
The figure above shows on the left side I2C settings, 0x33 (7bit) device address and the communication speed.
By clicking the "Read" button with the register 0xFF selected (you can omit 0x) and put FF on register address
window, its content is shown on "Data" field, 33 (0x33) the default device address. A new value: 34 (0x34) is now
entered in the "Data" field, then click "Write" button. The new address is applied immediately, so to further
communicate by the GUI, the I2C settings need to be updated with the new address value 34 otherwise an I2C
communication error is sent. See figures below.
Below, step by step, an example on how to change the device address from 0x33 to 0x34
- i2cget -y 0 0x33 0xFF to 0x33 (read address value)
- i2cset -y 0 0x33 0xFF 0x34 (write new address value)
- i2cget -y 0 0x34 0xFF to 0x34 (read new address value)
- i2cset -y 0 0x34 0xB9 0x01 (NVM write operation)
Please note that changes, made on the NVM shadow registers of the device, make permanent any change, an
“NVM write operation” needs to be performed by accessing the NVM control register. If this operation is not
performed, previously programmed, I2C address is loaded by NVM during next power-up sequence.
The NVM control register is located at address 0xB9 in which, the NVM write operation is performed by writing the
data 0x01.
1.4 Example 2: how to change NVM content from the STPMIC1A to the STPMIC1B
The STPMIC1A version can be (re)programmed to the STPMIC1B version; the main differences between the two
version are:
- LDO2 from 1.8 V to 2.9 V
- LDO2 from RANK0 to RANK2
- BUCK3 from 3.3 V to 1.8 V
- VINOK_Rise from 3.5 V to 3.3 V
The addresses to make the changes are:
- LDO2_VOUT 0xFD bit [3:2]
- LDO2_RANK 0xFA bit [3:2]
- BUCK3_VOUT 0xFC bit [5:4]
- VINOK_THRES 0xF8 bit [5:4]
EE 92 C0 02 F2 80 02 33
The 4 bits highlighted must be changed to obtain the B version starting from the A version
DE 92 C8 02 D2 88 02 33
The figure below shows the right settings to convert the STPMIC1 to version B. The “NVM write operation” starts
automatically by clicking the “Write NVM user sector” button and all contents are transferred from shadow
registers to the NVM contents, the next power ON cycle makes effective the changes.
1.5 Example 3: how to change NVM content from the STPMIC1C to STPMIC1A
The STPMIC1C version can be (re)programmed to the STPMIC1A version; the main differences between the two
version are:
- All LDOs output voltages
- All LDOs Rank#
- All buck converters output voltages
- All buck converters Rank#
- All optional settings by default
EA 00 00 00 00 80 00 33
The values below must be written to convert the STPMIC1 version from C to A
EE 92 C0 02 F2 80 02 33
The figure below shows the right settings to program the STPMIC1 version A. The “NVM write operation” starts
automatically by clicking the “Write NVM user sector” button and all contents are transferred from shadow
registers to the NVM contents, the next power ON cycle makes effective the changes.
Revision history
Contents
1 General considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1 Hardware considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Programming steps. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 Example 1: how to change I²C device addresss . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.3.1 GUI use. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.4 Example 2: how to change NVM content from the STPMIC1A to the STPMIC1B . . . . . . . . . 7
1.4.1 GUI use. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.5 Example 3: how to change NVM content from the STPMIC1C to STPMIC1A . . . . . . . . . . . . 9
1.5.1 GUI use. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
List of tables
Table 1. Document revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
List of figures
Figure 1. STEVAL-PMIC1x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
Figure 2. USBSTICK – I2C to USB interface. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Figure 3. ST GUI interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Figure 4. Minimum system requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Figure 5. I2C BUS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
Figure 6. General tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Figure 7. I2C settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Figure 8. I2C settings with new address value 34 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
Figure 9. NVM user version A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Figure 10. NVM user version B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
Figure 11. NVM user version C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
Figure 12. NVM user version A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10