Detecting unexpected power usage during application execution
Choose Driver>SWO Configuration to open the SWO Configuration dialog box. Make sure these settings are used:
CPU clock must be set to the same value as the CPU clock value set by your application. This is necessary to set the SWO clock and to obtain the correct data transfer rate to the debug probe.
This step requires a Cortex-M device with SWO.
Choose Driver>Power Log Setup to open the Power Log Setup window.
In the Power Log Setup window, specify a threshold value and the appropriate action, for example Log All and Halt CPU Above Threshold.
Choose Driver>Power Log to open the Power Log window. If you continuously want to save the power values to a file, choose Choose Live Log File from the context menu. In this case you also need to choose Enable Live Logging to.
Start the execution.
When the power consumption passes the threshold value, the execution will stop and perform the action you specified.
If you saved your logged power values to a file, you can open that file in an external tool for further analysis.