12.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

Fig. 28Power Profiler run snapshot

12.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 theInitializebutton and then theStartbutton 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

Fig. 29捕获数据时Power Profiler

捕获数据时:

  • 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

Fig. 30捕获数据时Power Profilerwith 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 theStopbutton, the user can terminate the process at any given time.

12.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 documentAN-B-055, 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

Fig. 31Power Profiler software cursors

12.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.

12.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:在这种模式下一个游标允许添加一个新的Timemarker when any mouse button is pressed.

12.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

  • 清除二级数据: 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

12.6.Power Profiler Chart Views

Every chart window supports the following plots types:

Current auto scaleOn 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 scaleOn 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在图表上绘制了超过控制面板中用户定义的阈值的最后10个当前模式。电源分析器将当前样本识别为有效模式的一部分(a)最后4个样本的平均电流超过控制面板中的用户定义的阈值,并且(b)模式持续时间长于70us。如果4样本窗口的平均电流低于控制面板中的用户定义的阈值,并且由于它上升的持续时间短于70Usecs,这不被认为是“有效”模式。此行为有助于过滤噪声和随机尖峰。

ChargeOn 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.

12.7.Chart management via mouse

  • Timemarker scrolling: while inSelectmode, 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 inSelectmode, 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

12.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

  • 主页:转向图表直到最后一条栏

  • End: shift chart till the first bar

  • Page Up:按时间轴的换档图表按向后一个窗口的大小

  • 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.

12.9.Power Profiler configuration

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

../_images/power_profiler_conf_dialog_hw_settings.png

Fig. 32Power 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. For DA1468x chips consult the followingTable 5

Table 5 Multiplication factor for DA1468x

DA1468x motherboard revision

Multiplication factor

revC

50

revD

100.

revE

100.

  • 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.

  • 自动触发阈值(MA): Determines the initial value of ‘Threshold’ textbox on control panel

  • Auto stop sampling time (ms):决定了“时间间隔”的初始值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.

  • 睡眠模式: Determines whether the measurement is done while in Extended or Deep 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)

  • 睡眠模式Extended (uA): Current dissipation taking count when Sleep Mode Extended selected.

  • 睡眠模式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

Fig. 33Power 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:如果选中,则在最大电流值上创建标记

  • 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:保存Snapshot .png文件的目标文件夹。

  • Custom scaling of Current Axis: The user defined current axis range to be used by the corresponding plot type.

12.10.Calibration Procedure

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

如果电源电压是不同的,或者需要更精确的测量,则可以遵循以下步骤,以便去除主板(主板)引入的任何添加负载:

  • Connect the motherboard to the PC.

  • 删除子板,使其不会消散任何权力。或者,如果适用,通过子板电源开关关闭子板(主板仍应通电)。

  • Open the Power Profiler configuration dialog and set calibration offset value to 0. Press ok to close the configuration dialog.

  • Click on theInitializebutton, followed by clicking on theStart按钮。然后按Stopbutton after a short period of time (e.g. 3 secs)

  • Check the value displayed on theAvg 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 theCalibration 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

Fig. 34Clear Power Profiler calibration offset

../_images/pp_calibration_after_stop.png

Fig. 35Note the ‘Avg Current (mA)’ value

../_images/pp_calibration_config_after.png

Fig. 36Set the new Power Profiler calibration offset value

When the daughter board is removed from the DA14531 PRO motherboard during calibration the power to the SPI flash must also be disconnected by removing the jumper connecting pins 1 and 2 on J1. If this is not done then the calibration current is about 1.5-2mA (the flash must be drawing this as its CS pin is left floating due to the daughter board being disconnected).

12.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 thePOWER_PROFILER_TRANSFER_SIZEproperty in properties.txt file.

    Listing 1 Code defining the POWER_PROFILER_TRANSFER_SIZE property
    POWER_PROFILER_TRANSFER_SIZE=65536

    Location ofproperties.txtfile is in user’s home directory under SmartSnippetsToolbox folder. e.g.

    C:\Users\\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. 使用旧的主板DA14585-6 DA14531。When using older motherboards marked as P_VC the following property should be set in the forementionedproperties.txtfile to get more accurate results from Power Profiler tool.

    Listing 2 Code defining the USE_PV_C_BOARD property
    use_pv_c_board.=true