Author Topic: Microcontroller Energy Profiling/EFM32 STKs are cheap right now  (Read 522 times)

0 Members and 1 Guest are viewing this topic.

Offline alexwhittemore

  • Frequent Contributor
  • **
  • Posts: 257
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?
« Last Edit: March 18, 2019, 08:10:31 pm by alexwhittemore »
 

Offline lucazader

  • Regular Contributor
  • *
  • Posts: 127
  • Country: nz
Re: Microcontroller Energy Profiling/EFM32 STKs are cheap right now
« Reply #1 on: March 18, 2019, 08:27:07 pm »
The recently announced (on kickstarter) Joulescope is probably perfect for what you want here.
 
The following users thanked this post: hans

Offline alexwhittemore

  • Frequent Contributor
  • **
  • Posts: 257
Re: Microcontroller Energy Profiling/EFM32 STKs are cheap right now
« Reply #2 on: March 18, 2019, 08:51:25 pm »
The recently announced (on kickstarter) Joulescope is probably perfect for what you want here.

Oh sweet jesus my wallet. You're right - it's nearly perfect, and completely out of my pricerange  :-DD. I suppose I'll have to get a client to buy it for me next time such becomes a high priority.

One thing it does leave out is any correlation to operation - with something like a CurrentRanger+Analog Discovery, you could have GPIO or printf-style (UART decode) program state indication - you see "C" on UART followed by a burst, and you know that burst was WIFI connection. You see a "S" and you know you're entering sleep mode, etc. Or of course, if you have one of these first-party options from SiLabs or Atmel, you could use your program counter trace to do about the same.

I'd love to see some kind of support on the Joulescope for input like that, maybe a bit more precise than a timestamp in this app matched up to a timestamp from UART, etc. Just some way to overlay markers onto the current trace.

EDIT: the Kickstarter page hasn't been updated, but it's in the updates - I'm not the first person to ask about it, and exactly this request will be in the production version: https://www.kickstarter.com/projects/jetperch/joulescope-precision-dc-energy-analyzer/posts/2427774

Ugh now I have 64 hours to find $500 laying under a couch cushion.
« Last Edit: March 18, 2019, 09:05:00 pm by alexwhittemore »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf