Jump to content
43oh

Sleep frequency - 999ms vs. 1000ms


Recommended Posts

Hi,

running this blinking led code on Launchpad MSP430FR2433

// Ultra Low Power Blink Example

#define LED RED_LED
  
void setup() {                
  for (int i = 2; i < 20; i++) {
      if (!(i == 11 || i == 12)){
        pinMode(i, OUTPUT);
        digitalWrite(i, LOW);
      }
  }
}

void loop() {
  sleep(2000);
  digitalWrite(LED, HIGH);   // turn the LED on (HIGH is the voltage level)
  sleep(3);
  digitalWrite(LED, LOW);    // turn the LED off by making the voltage LOW
}

resulting in this current profile:

image.thumb.png.82cd80df1fac91119a48a968eda0d3bf.png

The power consumption looks nice (with LED current limited via 3.3 kOhm) but the blinking frequency is rather 10 seconds instead of 2 seconds.

The launchpad is configured to run with external crystal.

Changing sleep(2000) to sleep(999) I got the following profile:

image.thumb.png.3cd17ac931453f13523d7f508883de21.png

The frequency is now OK but I am not sure if the same LPM mode is achieved during sleep phase.

Please, could someone give an insight about the difference? Can I run 2s blink frequency with ~1µA consumption during sleep phase?

Thanks in advance,

Robert

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...