Detecting unexpected power usage during application execution
Choose Driver>ITM Configuration to open the ITM 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 only when ITM data is transferred over the SWO communication channel in order to obtain the correct data transfer rate to the debug probe.
This step requires a device with SWD SWO (Serial Wire Output) capability.
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.