From Nordic: Automating Power Profiler Kit measurements from the command line
Nordic's Power Profiler Kit (PPK) is an inexpensive piece of hardware that can provide a significant amount of insight into the operation and performance of your project. Although there is a lot that you can learn by experimenting with the PPK using the Power Profiler app that's available inside nRF Connect for Desktop, the PPK can also be integrated deeper into your workflow to provide insight into how your design is performing as the hardware/software matures.
Regardless of whether or not you've used the PPK before it's a good idea to take a few minutes to check out the excellent "getting started" video here to remind yourself of its operation and nomenclature.
Connecting the PPK
The communication between the PC and the PPK uses Segger's Real-Time Transfer (RTT) functionality. This is essentially a very fast socket that is created by the J-Link debug probe that moves data between the J-Link drivers on a PC and a some RAM buffers on the microcontroller. The PPK itself doesn't have an onboard J-Link like Nordic development kits do so the typical scenario is to have the PPK simply hijack the Device Under Test's (DUT's) debug probe on a development kit. A standalone J-Link or an ancillary development kit can also be used to talk to the PPK if the DUT needs to use its own debug probe for programming or debugging. The various scenarios are described in the PPK's documentation.
This blog post assumes that you have access to two development kits and it uses the measuring current on an nRF5 DK while debugging configuration. In short, this look like:
- An unmodified development kit plus a 10-pin, IDC cable is acting as the PPK's J-Link.
- The IDC cable runs from the unmodified development kit's "Debug out" header to the PPK's "Debug in" header.
- The development kit to use as the DUT has been modified so its "SB9" solder bridge is no longer shorted.
- The PPK itself is plugged into the DUT development kit and the PPK's "DUT select" switch is set to "DK", the "Power select" switch is set to "DK", and the "COM" switch is set to "EXT".
'
>>CLICK HERE TO KEEP READING
Source: https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/ppk_5f00_api