Really I'm mashing two topics into one here but I'm sure interested to get your take. One is energy debugging, one is cheap EFM32 STKs on Mouser.
I'm a bit down a rabbit hole of system energy profiling for small microcontroller products right now. For representative example: a WIFI sensor that sleeps at 500nA, wakes up after a timeout, reads a sensor, connects to wifi to exfil data (300mA bursts), then goes back to sleep. This typically takes something like 7 seconds, and if you're not interested in doing the calc, that's ~116dB of dynamic range.
Options I know of include:
- uCurrent
- Low Power Labs CurrentRanger
- Atmel atpowerdebugger
- Advanced Energy Monitor on EFM32 STKs
- Low Power Labs CurrentRanger
I'm pretty sure there are some expensive probes that support this task as well, but I can't find them so maybe not. EDIT: I was thinking there was a J-Link product, but I don't think there is after looking. What I was definitely thinking of is Lauterbach tools.
The uCurrent really isn't suitable unless you just want to spot-check static functionality. Put your product in sleep mode and measure a point, put your product in all-LEDs-blaizing mode and measure a point, so on.
The CurrentRanger is awesome because it auto-ranges fast enough to get good dynamic data without browning-out the DUT, but it doesn't (in the factory firmware) support hardware indication of what range it's in - it just shows you an LED. I do expect, before too long, I'll use some of the spare IOs to do just that, so I can set up a MATH trace something like "output (amps) = (A1*D1*1e-9)+(A1*D2*1e-6)+(A1*D3*1e-3)"
But neither of these correlate the in-time data to, say, a stack trace showing what function i'm in. Both of the next two options do that:
The Atmel atpowerdebugger (
https://www.digikey.com/products/en?mpart=ATPOWERDEBUGGER&v=150) is basically a $190 Atmel-ICE (typ. $130) that has current measurement built-in, and tools in Atmel Studio to measure that current. Additionally, the debugger portion of it is CMSIS-DAP compliant, so it should, in theory, work with any old Cortex-M target you want to use, not necessarily only Atmel parts. It's got 1 channel that's high-res at 100mA full scale, and one that's lower-res at 1A full scale. Not sure if you can use both simultaneously to, say, separate your power domains and measure the high-burners separate from the sleep-mode-sippers, all at once. I haven't finished reading the user guide yet to figure out if it supports the trace-aware time correlation that the next option does.
The EFM32 STKs from SiLabs have an "Advanced Energy Monitor," which is basically a 0.1uA to 50mA current measurement channel integrated with an embedded J-Link debugger, such that you can correlate current consumption with your stack trace. Pretty neat! What's extra-rad is that every STK on SiLabs' website is currently listed at $89 or $99, but Mouser has all of the older "EFM32xG-STK3x00" series STK boards for $30. Here's the
GiantGecko 3700 board, for example. The newer boards with newer parts and more interesting peripherals included are still in the $100 range. I wonder if SiLabs hiked the price of all STKs with the new releases and Mouser has old stock? Unfortunately, because the embedded debugger is an EFM32-locked Segger J-Link, there's not much hope of using the board to trace+power-debug a non-EFM32 external target. But if you don't mind missing out on the trace data, you can hook up whatever old device you want to the AEM side and measure only that. $30 seems like an excellent deal for a high dynamic range current profiler with pretty good software behind it. Especially if you're already working with EFM32 parts.
If you're the type of person who's had to do embedded power profiling before, what does your toolbox look like?