ULINKplus User's GuideIntroduction Hardware Description Debug and Trace Power Measurement Power Interface Power Measurement Setup Measurement Modes Analyzing Power Consumption Test Automation µVision Windows Troubleshooting Appendix
Power Measurement Setup
After ULINKplus is selected as target debug adapter in the µVision project you can configure the ULINKplus for power measurement. This can be done in three different ways:
Configuring power measurement in ULINKplus window
In the debug mode, open the ULINKplus dialog from menu View - Analysis Windows - ULINKplus.
The Power section shows these values:
ULINKplus comes with a set of six boards for external shunts. Please refer to the following table for the resistor values:
Configuring power measurement using command window
µVision has a set of Virtual Simulation Registers (VTREGs) for power measurement settings and values. These VTREGs can be accessed at run-time during debug session from µVision Command Window. For example:
Power measurement VTREGS
The table below describes the ULINKplus power measurement Virtual Simulation Registers (VTREGs):
See µVision documentation for additional details on Virtual Simulation Registers (VTREGs).
Configuring power measurement using debug script
The µVision debugger allows you to construct and execute a sequence of debugger commands using an initialization script.
For ULINKplus configuration the Debug_UlinkPlus.ini initialization file can be used as a template for such script. It is located at [MDK installation_path]\ARM\ULINK\Template\ and best should be copied in the project directory for editing. The default [MDK installation_path] is C:\Keil_V5.
The path to such *.ini file should be provided in the debug configuration dialog:
In this script, you can assign target values to the ULINKplus VTREGs and hence get the ULINKplus automatically configured right before the debug session start or prior to energy measurement without debug.
The file is already annotated with Configuration Wizard support, enabling GUI-like configuration for enabling power measurement and selecting the external shunt values.
The Debug_UlinkPlus.ini template also annotates I/O pin configuration and provides function examples.
For more information on debug scripts, see Command input from file.
Offset calibration for current
For a precise measurement of very small currents, the bias offset of ULINKplus needs calibration. This offset differs, based on the shunt resistors. The VTREG ULINK_I_OFFSET contains the offset adjustment after calibration.
Capture the current offset
The following steps describe how to adjust the current offset:
When starting a new energy measurement or debug session, the offset value will be taken into account.
To remove the offset, specify a negative number.
of your data.