Skip to content

SAMD21 wrong sleep time with Seeedstudio XIAO #57

Open
@i-g-g-y

Description

@i-g-g-y

Hello.

I am seeing issues with wrong sleep time length on Seeedstudio SAMD21 board.

This code sleeps for 1.7 seconds, but should sleep for 1s:

#include "ArduinoLowPower.h"

#define DONE_PIN 1
#define LED_PIN LED_BUILTIN

void setup() {}

void loop() {
    digitalWrite(LED_PIN, HIGH);
    LowPower.deepSleep(1000);
    digitalWrite(LED_PIN, LOW);
 
    signalDONE(100);
    delay(10);
    signalDONE(200);
}

void signalDONE(uint8_t timeout) {
  pinMode(DONE_PIN, OUTPUT);
  digitalWrite(DONE_PIN, HIGH);
  delay(timeout);
  digitalWrite(DONE_PIN, LOW);
}

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: imperfectionPerceived defect in any part of project

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions