10. Power Profiler

The purpose of the ‘Power Profiler’ is to plot the current (and associated charge) drawn by the battery on the chip in real time over USB.

Note

The default view shown is Current(1)/Charge

../_images/profiler.png

Figure 23 Power Profiler run snapshot

10.1. Power Profile basic usage

To start capturing measurements with the Power Profiler:

  • Make sure an application is already running so that meaningful data instead of noise if captured by Power Profiler.
  • Switch to the Power Profiler tool by clicking either on toolbar’s Power Monitor layout or on toolbar’s Power Profiler tool.
  • Press the Initialize button and then the Start button in order to start the data capturing process.

The Power Profiler should have now started capturing data and should be looking similar to the following picture:

../_images/pp_capturing_data.png

Figure 24 Power Profiler while capturing data

While capturing data:

  • The ‘Peak Current (mA)’, the ‘Average Current (mA)’ and the ‘Charge (uC)’ values of the info panel are updated.
  • The info panel also shows the ‘Sleep Mode’ of the current measurement: it can be either in ‘Deep Sleep’ or in ‘Extended Sleep’ mode (the mode is configurable through the configuration page, see below). While in sleep mode, Power Profiler still calculates the power dissipation during this period of inactivity by assuming a 550nA consumption while in Deep Sleep and a 1.2uA consumption while in Extended Sleep mode. This significantly improves the ‘Average Current (mA)’ measurement since it takes into account the power consumption for the entire period of time.
  • The plot area is updated as new data is captured.
  • It is recommended to use the zoom in/zoom out controls (and the other controls mentioned below) to adjust the plot viewport in a way that helps the user understand what the running application is doing and identify the different patterns. Depending on how the application works, and after applying the proper zooming, user should be able to identify the mode that the application is on such as idle, sleep, receiving, transmitting, advertising etc. The following figure shows the same signal as before but after having zoomed in appropriately:
../_images/pp_capturing_data_zoomed.png

Figure 25 Power Profiler while capturing data with proper zooming

To stop capturing measurements with the Power Profiler:

  • If auto stop mode is disabled, the process will run indefinitely.
  • If auto stop mode is enabled, after collecting a specific number of data samples, the data capturing process is terminated.
  • By pressing the Stop button, the user can terminate the process at any given time.

10.2. Power Profiler software cursors

The User has the ability to insert a vertical cursor in the Power Profiler display (SW cursor) by toggling a specific GPIO in the SW running on the ARM Cortex M0 CPU. Instructions on how to implement this are described in detail in the document UM-B-005, Dialog Semiconductor.

The SW cursor provides an accurate correlation between the SW and the Power profile of the system in real time. The vertical line is not movable on the display window.

../_images/ppCursor.png

Figure 26 Power Profiler software cursors

10.3. Power Profiler control panel

Threshold (mA): If ‘Auto Trigger’ is checked and start button is pressed, the data capturing process starts when signal exceeds the threshold value. It is also used when Power Profiler is running in oscilloscope mode to identify patterns whose current exceeds the threshold value.

Time Interval (ms): If ‘Auto Stop’ is checked and data capturing is in progress, the process stops automatically after ‘Time Interval’ ms.

10.4. Power Profiler Chart Controls

The user can work in the following tool modes:

Select/Move: Selection mode (standard). In this mode a cursor allows selecting ‘Time Marker’ objects in the chart. If Del key is pressed the selected ‘Time Marker’ gets deleted.

Measure: In this mode a cursor allows showing distances of time, current and charge between two points of the chart window. While in this mode, if user presses any mouse button and moves the cursor, a line connecting these two points is drawn. The distance between the points is highlighted to the right of the second point of the line. It looks like ‘dt: [distance of time between two points] ms / dI: [distance of current between two points] mA’. If left mouse is pressed for a second time, the cursor is free to start a new measurement. Cursor can be switched to Select mode by pressing the Esc button.

Add Time Marker: In this mode a cursor allows adding a new Timemarker when any mouse button is pressed.

10.5. Power Profiler Data

The following buttons are available:

  • Export to CSV: Exports the captured current data to csv file
  • Import from CSV: Imports old current data from csv file
  • Clear Secondary Data: Clears the secondary current data and hides it from the chart view
  • Clear Primary Data: Clears the primary current data and hides it from the chart view
  • Snapshot: Takes an image snapshot of the Power Profiler chart window in .png format

10.6. Power Profiler Chart Views

Every chart window supports the following plots types:

Current auto scale On the chart are plotted the current data following the scale which is determined by the minimum and the maximum values of the current.

Current custom scale On the chart are plotted the current data following the scale which is determined by the user defined minimum and maximum values in the configuration dialog under the ‘Custom Scaling of Current Axis’.

Oscilloscope On the chart are plotted the last 10 current patterns that exceed the threshold value defined by the user in the control panel. Power Profiler identifies current samples as part of a valid pattern when (a) The average current of the last 4 samples goes over the threshold value defined by the user in the control panel, and (b) the pattern duration is longer than 70us. If the average current of the 4-sample window goes below the threshold value defined by the user in the control panel, and the duration since it went up is shorter than 70usecs, this is not considered to be a ‘valid’ pattern. This behavior helps filtering out noise and random spikes.

Charge On the chart are plotted the calculated charge values.

The user can switch between the following available view modes by pressing the corresponding toolbar buttons.

  • Current 1 / Charge
  • Current 1 / Current 2
  • Current 1 / Oscilloscope
  • Current 2 / Charge

Note that charts Current 1 and Current 2 plot the same data but may present them in a different scale. This can be achieved by selecting different axis minimum & maximum values in Config Dialog > Chart Settings > Axis.

10.7. Chart management via mouse

  • Timemarker scrolling: while in Select mode, by clicking on any point of a Timemarker with the left mouse, holding the button pressed and then horizontally moving the cursor
  • Chart scrolling: while in Select mode, by clicking on any point in the chart window, holding the button pressed and then horizontally moving the cursor
  • Zoom In/Out: while in any mode, by moving the mouse wheel over the chart window

10.8. Chart management via keyboard

The user can manage the Power Profiler via the keyboard. To do so, the cursor should be above the Power Profiler graphs.

  • Plus(+): zoom in
  • Minus(-): zoom out
  • Home: shift chart till the last bar
  • End: shift chart till the first bar
  • Page Up: shift chart in time axis by size of one window backwards
  • Page Down: shift chart in time axis by size of one window forward
  • Left Cursor: shift chart in time axis by size of 5% window backwards
  • Right Cursor: shift chart in time axis by size of 5% window forward
  • Del: Delete the selected Time Marker
  • F12: Takes an image snapshot of chart window in png format. The path where snapshots are saved can be specified in the Config dialog > Chart Settings > Snapshot File Path.

10.9. Power Profiler configuration

By pressing the ‘Config’ button, the Power Profiler configuration dialog shows up:

../_images/power_profiler_conf_dialog_hw_settings.png

Figure 27 Power Profiler configuration HW Settings

H/W Settings:

  • Voltage (V):The voltage to be used for the charge and energy calculations. Possible range is 1.8 to 4.3V. The default setting is 3.0V
  • Calibration offset (mA):Determines the offset value while converting captured values to current (in mA) values. See below the ‘Calibration Procedure’ section for more details.
  • Multiplication factor: Determines the multiplier value while converting captured values to current (in mA) values. Default value is 100. User should set this value to 50 for revC motherboards and to 100 for revD.
  • Samples for SW cursor: How many zero samples to collect before adding a S/W cursor to the chart.
  • SW Cursor tolerance (uA): The upper threshold under which samples are considered to be equal to zero. Related to S/W cursors and the fact that although we expect to measure 0uA during a S/W cursor, in reality we measure values that are usually lower than 5uA.
  • SW Cursors to Stop: How many SW cursors to add to the chart before stopping data capture. Data capture is stopped with a time offset of 100 ms.
  • Time offset of SW Cursor (ms): Correction time offset of SW cursors.
  • Auto trigger threshold (mA): Determines the initial value of ‘Threshold’ textbox on control panel
  • Auto stop sampling time (ms): Determines the initial value of ‘Time Interval’ textbox on control panel
  • Pre trigger sampling time (ms): The amount of captured data (in ms), just before the start of data capturing process
  • Max allowed sampling time (ms): The maximum allowed sampling time during the data capturing process
  • Sample Rate: The number of data samples collected from the board.
  • Sleep Mode: Determines whether the measurement is done while in Extended or Deep sleep mode
  • Sleep Mode Threshold (uA): The upper threshold under which measured values are considered equal to the standard current dissipation for that mode (1.2uA if in ‘Deep Sleep’ and 0.6uA if in ‘Extended Sleep’ mode)
  • Sleep Mode Extended (uA): Current dissipation taking count when Sleep Mode Extended selected.
  • Sleep Mode Deep (uA): Current dissipation taking count when Sleep Mode Deep selected.
  • CSV File path: Export/Import destination for csv files
  • Enable UART protocol parser: Open UART and wait for commands. This feature is not yet fully implemented.
../_images/power_profiler_configuration2.png

Figure 28 Power Profiler configuration Chart Settings

Chart Settings:

  • Show current value when mouse on graph: If checked, a tooltip shows the time and current value when the mouse is over the waveform
  • Create event markers on max sample values: If checked, a marker is created on maximum current value
  • Enable Level Of Detail process (LOD): If checked, Power Profiler will compute a multilevel approximation of waveform.
  • Max Number of Samples To Draw: it allows the user control the plot quality by determining the maximum number of samples to draw during downsampling
  • Snapshot File Path: Save destination folder for snapshot .png files.
  • Custom scaling of Current Axis: The user defined current axis range to be used by the corresponding plot type.

10.10. Calibration Procedure

By default, Power Profile prefills the Calibration offset (mA) configuration setting with value -0.01724mA, which is a good approximation for the default 3.0V supply voltage.

If the supply voltage is different, or more accurate measurements are required, the following steps can be followed in order to remove any added load introduced by the main board (motherboard):

  • Connect the motherboard to the PC.
  • Remove the daughter board so that it does not dissipate any power. Alternatively, if applicable, power off the daughterboard via the daughterboard power switch (the motherboard should still be powered on).
  • Open the Power Profiler configuration dialog and set calibration offset value to 0. Press ok to close the configuration dialog.
  • Click on the Initialize button, followed by clicking on the Start button. Then press the Stop button after a short period of time (e.g. 3 secs)
  • Check the value displayed on the Avg Current (mA) field. This is the current introduced by the motherboard that we would like to subtract from subsequent measurements.
  • Open the Power Profiler configuration dialog again and enter this value with the minus sign to the Calibration offset (mA) field. Press ok to close the configuration dialog.
  • Connect (or alternatively switch on) the daughter board and follow the normal procedure for taking measurements.

The following images explain the procedure described above:

../_images/pp_calibration_config_before.png

Figure 29 Clear Power Profiler calibration offset

../_images/pp_calibration_after_stop.png

Figure 30 Note the ‘Avg Current (mA)’ value

../_images/pp_calibration_config_after.png

Figure 31 Set the new Power Profiler calibration offset value

10.11. Power Profiler special properties

  1. Power Profiler Transfer Size property: User can change the transfer size for USB IN and OUT requests. Transfer size is especially critical when running SmartSnippets™ Toolbox on Linux OS over a virtual machine environment. The default size used is 16000 bytes and acceptable values are multiples of 64 bytes between 64 bytes and 64k bytes. In order to override the default value, the user can set the POWER_PROFILER_TRANSFER_SIZE property in properties.txt file.

    Code 1 Code defining the POWER_PROFILER_TRANSFER_SIZE property
    POWER_PROFILER_TRANSFER_SIZE=65536
    

    Location of properties.txt file is in user’s home directory under SmartSnippetsToolbox folder. e.g.

    C:\Users\<user>\SmartSnippetsToolbox\properties.txt

    The default value has been tested and proved to be the maximum transfer size that ensures stable performance of Power Profile when running on Linux OS over a virtual machine environment.

  2. Use of older motherboard for DA14585-6, DA14531. When using older motherboards marked as P_VC the following property should be set in the forementioned properties.txt file to get more accurate results from Power Profiler tool.

    Code 2 Code defining the USE_PV_C_BOARD property
    USE_PV_C_BOARD=true