The STM32-LPM01-XN is an STMicroelectronics energy meter firmware dedicated to power
consumption measurements for microcontrollers and boards.
It runs on X-NUCLEO-LPM01A and STM32L562E-DK boards.
In this document the firmware and its associated boards are referred to as “PowerShield”.
PowerShield is a a plug-and-play solution intended to ease power consumption
measurements, used to supply and measure current consumption of boards such as STM32
Nucleo and Arduino
This document guides the user through the firmware characteristics and specific use cases.
This document must be read in conjunction with the following documents, available on
www.st.com:
• User manuals of boards:
– STM32 Nucleo expansion board for power consumption measurement (UM2243) for
standalone board X-NUCLEO-LPM01A
– Discovery board with STM32L562E MCU (UM2617) for STM32L5 discovery kit,
• User manuals of software tool:
– STM32CubeMonitor-Power software tool for power and ultra-low-power
For of complete description of PowerShield boards, refer to user manuals:
•For standalone board X-NUCLEO-LPM01A: STM32 Nucleo expansion board for power
consumption measurement (UM2243).
•For STM32L5 discovery kit: Discovery board with STM32L562E MCU (UM2617).
These boards and related firmware support STM32 Arm®-based devices.
Note:Arm is a registered trademark of Arm Limited (or its subsidiaries) in the US and/or
elsewhere
1.1 PowerShield standalone board X-NUCLEO-LPM01A
PowerShield board is designed in a user-friendly mode. All features can be controlled by
few buttons on board or USB interface.
Figure 1. PowerShield board main interface items
UM2269 Rev 67/59
58
Boards overviewUM2269
MS46931V1
UART
connector
USB
connector
AVDD
GND
D7
D3
D2
+3V3
+5V
GND
GND
Nucleo144
Nucleo64
Connectors
(Arduino
Uno)
Generic
connector
for any
target
+3V3
or AVDD
GNDGND
GND
+5V
D2
D3
D7
AVDD
+3V3
Nucleo32
Connectors
(Arduino
Nano)
PowerShield board offers three connectors to supply target board: Nucleo64 connector,
Nucleo32 connector, basic connector for any target.
Power supply interface
Nucleo connectors have two different pins for power supply:
•+3V3: Power supply for the whole board
•AVDD (AREF): Power supply for the MCU only
PowerShield supply to one of these two pins can be selected by jumpers JP9 and JP10.
•JP10 closed: Power supply on connector +3V3
•JP9 closed: Power supply on connector AVDD
Note:Power can be supplied to one or to both pins (+3V3 and AVDD), depending on target board
configuration to be monitored.
Communication interface
Two physical interfaces are available: USB and UART (reserved for future use).
Figure 2. PowerShield connectors
8/59UM2269 Rev 6
UM2269Boards overview
LED information
The board embeds four LED to inform user on PowerShield state, in standalone mode and
controlled by host mode:
•LED green (LD4): Acquisition ongoing
•LED orange (LD3): Power supply to target board (in controlled by host mode, the board
can remain supplied when the acquisition is completed)
•LED blue (LD1): Current measured above defined threshold
•LED red (LD2): Error
1.2 Quick setup to measure current on board Nucleo64 with
standalone board X-NUCLEO-LPM01A
Refer to user manual STM32 Nucleo-64 boards (MB1136) (UM1724) for a complete
description of Nucleo64 board.
Setup to measure current consumption of MCU only:
•On PowerShield:
–Jumpers of power supply pin: Close jumper AREF_ARD, open jumper 3V3_ARD
•On board Nucleo64:
–Load the desired code to be executed on target board.
–Remove solder bridge SB12 to disconnect reset signal from ST-Link part (ST-Link
can still be used with this configuration to load and debug a program, software tool
option “Connect during reset” may be needed).
–Open jumper IDD
1.3 STM32L5 discovery board STM32L562E-DK
STM32L5 discovery board embeds a PowerShield circuitry to measure the STM32L5 MCU
power consumption.
It has the same features as PowerShield standalone board except that the STM32L5
discovery board must be used in host mode with computer through USB interface, moreover
the acquisition mode static is not available (dynamic mode only). Refer to
PowerShield modes and requirements and Section 5: PowerShield acquisition mode
dynamic characteristics for more details.
Section 2:
UM2269 Rev 69/59
58
Boards overviewUM2269
Figure 3. STM32L5 discovery board
10/59UM2269 Rev 6
UM2269PowerShield modes and requirements
MS46932V1
(no software required)
USB: power supply only
10.365 uA
PowerShield
+ target board
Host: PC, ...
2 PowerShield modes and requirements
The PowerShield features up to three modes.
2.1 Standalone mode
This mode is available only on standalone board X-NUCLEO-LPM01A.
PowerShield is controlled with board buttons, joystick and LCD display.
It must be connected to a USB port only to get power supply from USB (does not use USB
data).
This mode can be used for quick measurements with basic settings, or for demonstrations.
Figure 4. PowerShield in standalone mode
Requirements:
•No communication interface requirement: user buttons and LCD displays are available
on board
•Power supply: 5 V must be provided either by:
–An USB connector:
a) Computer: in this case, USB enumeration is performed but USB remains
unused.
b) Charger or power bank: in this case, no USB enumeration is performed.
–A generic connector (to input 5 V):
a) External power supply
b) Battery
–Arduino connector:
a) Shield Lithium Arduino (Arduino pin +5 V)
UM2269 Rev 611/59
58
PowerShield modes and requirementsUM2269
MS46933V1
COM port terminal
PowerShield >
PowerShield >
USB: power supply
and data
Contr host
PowerShield
+ target board
Host: PC, ...
2.2 Controlled by host mode with commands sent by a COM
port terminal
Host computer controls PowerShield through USB VCP (Virtual COM port).
The interface is a standard terminal.
This mode can be used for quick measurements with customized settings or for automation
of tests, by sending a script with PowerShield commands.
Figure 5. PowerShield in controlled by host mode with commands sent
by a COM port terminal
Requirements:
•Computer driver for USB VCP (Virtual COM port) "STM32 Virtual COM Port Driver".
Refer to driver STSW-STM32102 on STMicroelectronics web site www.st.com.
Note: On operating system Microsoft Windows 10, this driver is optional (since
PowerShield FW revision 1.0.2). By default, PowerShield can use the operating
system USB VCP driver. STMicroelectronics USB VCP driver can be installed, in
this case it takes priority over operating system driver.
•Software terminal (large variety of free terminals available on the Internet)
2.3 Controlled by host mode with commands sent by a GUI
PowerShield is controlled from host computer through USB VCP (Virtual COM port).
The interface is a dedicated GUI software.
This mode can be used to benefit of full capability of PowerShield measurement data:
graphical data outcomes, statistical data.
12/59UM2269 Rev 6
UM2269PowerShield modes and requirements
MS46934V1
PowerMonitor software
USB: power supply
and data
Contr host
PowerShield
+ target board
Host: PC, ...
Figure 6. PowerShield in controlled by host mode with commands sent by a GUI
Requirements:
•Computer driver for USB VCP (Virtual COM port) "STM32 Virtual COM Port Driver".
Refer to driver STSW-STM32102 on STMicroelectronics web site www.st.com.
Note: On operating system Microsoft Windows 10, this driver is optional (since
PowerShield FW revision 1.0.2). By default, PowerShield can use the operating
system USB VCP driver. STMicroelectronics USB VCP driver can be installed, in
this case it takes priority over operating system driver.
•STMicroelectronics PowerShield GUI software STM32CubeMonitor-Power. Refer to
user manual STM32CubeMonitor-Power software tool for power and ultra-low-power measurements (UM2202).
UM2269 Rev 613/59
58
PowerShield standalone modeUM2269
3 PowerShield standalone mode
The communication interface available on board features:
•Two buttons:
–Reset
–Enter / Start
•One joystick.
The joystick embeds five push buttons: four directions and one in the center of joystick.
The button in the center of joystick has the same function as button “ENTER” of
keyboard.
•One LCD display: Monochrome, two lines of 16 characters
Note:A third button “reset” is available on board. It is not used as communication interface, but to
perform a reset of PowerShield FW (similar to unplug and plug the board power supply).
The following scheme describes standalone mode interface navigation.
1) PowerShield power-up
Welcome message for approximately two seconds.
PowerShield waits for user action.
Wait two seconds
14/59UM2269 Rev 6
UM2269PowerShield standalone mode
2) Acquisition mode dynamic: starts measurement and
views different data (average, power, energy, …)
From measurement stopped:
Button “enter”:
When user presses on button “enter”, PowerShield
powers-up supply of target board and starts measurement.
Default parameters:
– Power-up board, voltage: 3.0 V
– Integration time: 1 s
First line {voltage, current} is always displayed.
Voltage and current are instantaneous values (0.1 s
averages).
Second line displays different data, circularly:
– Current average with integration time
– Current max
– Current min
– Power (Watt)
– Energy (Joule) with integration time
– ULP bench score: calculation of score depending on
energy.
Prerequisite: board target must run an ULP bench
compliant program
– Temperature
Joystick down
Joystick down
Joystick down
Joystick down
Joystick down
Joystick down
(Joystick up doing the same in reverse
order)
UM2269 Rev 615/59
58
PowerShield standalone modeUM2269
3) Acquisition mode static: starts measurement and views
data
From measurement stopped:
Button “enter”:
To start a new acquisition without switching-off the power
supply of target: press joystick up or down
4) Acquisition mode dynamic and static: stops and starts
new measurement
Button “enter” toggles stop and start measurement.
Wait few tens of ms
From measurement ongoing:
Button “enter”:
When measurement is stopped, power supply of target is
switched-off.
From measurement stopped:
Button “enter”:
16/59UM2269 Rev 6
UM2269PowerShield standalone mode
5) Changes measurement settings: configuration menu.
Rolling menu with configuration items one by one.
Each item has few parameters selectable.
Cursor moving: joystick to the right (after last parameter,
roll back to first parameter).
Back (Exit from configuration menu): joystick to the left.
6) Changes configuration: voltage
Applies for acquisition mode: dynamic and static.
Parameters:
– 1.8 V
– 2.4 V
– 3.0 V
– 3.3 V
5) Integration time.
Applies for acquisition mode: dynamic.
Parameters:
–1 s
– 10 s
– 100 s
In data display, “Iavg xxx” and “Energ xxx” show the