Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LaunchPad CC1350: How to Get Low Power Mode < 2.6 mA? #15

Closed
rei-vilo opened this issue Jun 12, 2018 · 1 comment
Closed

LaunchPad CC1350: How to Get Low Power Mode < 2.6 mA? #15

rei-vilo opened this issue Jun 12, 2018 · 1 comment

Comments

@rei-vilo
Copy link
Member

rei-vilo commented Jun 12, 2018

The following Blinky sketch uses Energia MT with 2 clocks, and turns the LED on for 300 ms and off for 1700 ms.

EnergyTrace gives the following results:

  • LED on: 30.9 mW or 8.7 mA
  • LED off: 9.4 mW or 2.6 mA

2018-06-12 13-16-57 capture

When the LED is off, the CC1350 is idle (no tasks running) and thus should be in low power mode. However, it still uses 2.6 mA and battery life for a CR2032 is estimated to 2.2 days.

How to lower the low power mode consumption even further?

Sketch

#include "Galaxia.h"

Clock myClockOff, myClockOn;

void functionClockOn() {
  digitalWrite(GREEN_LED, HIGH);
}

void functionClockOff() {
  digitalWrite(GREEN_LED, LOW);  
}

void setup() {
  pinMode(GREEN_LED, OUTPUT);
  myClockOn.begin(functionClockOn, 100, 2000);
  myClockOff.begin(functionClockOff, 400, 2000);
  myClockOn.start();
  myClockOff.start();
}

void loop() {  
}
@rei-vilo
Copy link
Member Author

The issue is just hidden inside loop(): it is empty, but it runs continuously.

The loop() function should include a yield mechanism, e.g. delay().

With just adding delay(1000); to the loop() function, the CC1350 only requires 0,039 mW or 0,011 mA when in idle or low power mode.

2018-06-20 20-33-10 capture

The error was so big and so obvious it was difficult to spot.

Instead of using delay(1000);, shouldn't be better to use something like yield();?

I'm thus closing the issue.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant