IMP003 current is unexpected high

I measured current of our battery powered device with IMP003 and it is higher than expected. See scope picture. Current is 60mA per division. I divide the current in to phases.

  1. IMP is not so active - during 0.9s about 30mA
  2. IMP actively samples an accelerometer over SPI - during 1.2s about 60mA
  3. IMP is connecting to wifi - during 1.5s about 110mA
  4. IMP is connected to wifi and sends and receives data during 3.4s about 60mA (imp.setpowersave(true))
  5. IMP sleeps (5.0s)

Questions:
A. What is the expected current of an offline but not so active IMP?
B. What is the expected current of an offline and highly active IMP?
C. What do you think of the current charts?
D. The IMP is sleeping 4s in stead of the programmed 5s. What is the reason for that?

A. “not so active” is an extremely hard to quantify mode. I would expect it to be between 8mA and 86mA as those are the outer bounds for the STM32 but other than that it’s hard to say. impOS will automatically scale down the clocks when Squirrel is completely idle but is less predictable when there is still activity. It also make a big difference what peripherals you have configured since they are all derived from the main clock so once, say a PWM is configured impOS change drop the clock down to get lower power. I’d say 30mA seems pretty reasonable for booting and starting squirrel.

B. Table 20 of the STM32F405 datasheet should give you a pretty good idea of power consumptions when the WiFi is off. As you can see, when running at 144MHz the typical power for operation with peripherals enabled is 67mA, so your measured 60mA seems pretty reasonable.

C. Look totally normal to me.

D. Deepsleep is based off of the hardware RTC which is only accurate to the second. Since you may be at 0.99 seconds when you tell it to sleep for 5 seconds you might only sleep for 4.01 seconds. It should average out to 4.5 seconds so if you are consistently seeing 4 seconds then we will need to look at that.

Note, the length of your wakeups I wouldn’t expect powersave to do anything. Powersave works by snoozing the WiFi between beacons but as long as you are sending/receiving data then it can’t be snoozed. Even if you aren’t sending data it takes many hundred milliseconds to actually drop down to the lower power states.