energia / msp430-lg-core

15 stars 12 forks source link

[MSP430G2553] sleep() sleepSeconds() duration issue #66

Open battosai30 opened 6 years ago

battosai30 commented 6 years ago

Hi,

When I run a simple blink using sleep() or sleepSeconds() instead of delay(), the durations are not respected. I did not make a precise measure, but the factor seems to be 10x ( sleepSeconds(1) seems to lead to a 10s pause, sleep(500) seems to lead to a 5s pause ...).

I just re-installed 1.0.3 msp430 core to be sure (I will try with previous versions). Not tested on other microcontroller. Original lauchpad 32768 Hz crystal is soldered. Windows 10

Code :

void setup() {
 pinMode(P1_0,OUTPUT);
}

void loop() {
digitalWrite(P1_0,HIGH);
sleepSeconds(1);
  digitalWrite(P1_0,LOW);
sleepSeconds(1);
}