This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Current Measurement for sets of operations

Hi,

I'm trying to compare current consumed for different sets of commands mainly with floating point operations in them. As they execute fast, I'm putting them in a loop in simple programs and then I measure the average current for a few seconds.

A sample code is attached here.

I tested this on nRF Beacon kit with SDK 9 and S110. No GPIO and LEDs are used, I reset the board after programming, but the power supply shows constantly ~ 3mA which should not be just for these operations.

When I include power_manage() at the end of the loop the current goes to 0 mA, which shows low current but my loop will only run once and I can not measure the current for those operations.

So, what is causing that 3mA? I assume I must disable some modules which I'm missing.

Also, my measurements are relative, so I don't mind if extra hundreds of uA are included (as long as they are consistent for all programs) but mA seems too much.

As I'm using 32KHz XTAL, I don't think this applies, and even if does it's only 1mA.

Thanks!

  • @FA: What would you expect the result should be ? When you keep the CPU working (which is your case when you do floating point operation all the time) the CPU consumes 4.1mA. 3mA is a little bit strange.

    When you put the CPU to sleep with power_manage() it will stop consume power and you see 0mA. If you want your code to run periodically, you would need to use a timer and wake the chip up with an interval and execute the code.

Related