Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: Teensy LC not sleeping with SPI Flash

  1. #1

    Teensy LC not sleeping with SPI Flash

    Ok I have lost about 6 hours of hair so i need to consult some outside help..

    I am using a Teensy LC to do basic datalogging but i cant get the LC to sleep properly. The problem seems to be the inclusion of the SPI memory library.
    If i comment out flash.begin(); and flash.powerDown(); I can get the proper uA sleep but otherwise it stays in high power.

    Where should i start looking? Is it related to the SPI? Trying to trace the SPIMemory library hasnt really been fruitful yet.

    I have ruled out the LIS3DH sensor so ignore that code. I am just setting it to full sleep mode.

    Flash library:

    #include <Snooze.h>
    #include <SPI.h>
    #include <SPIMemory.h>
    #include "LIS3DH.h"
    static const int CSFLASHPIN = 23;
    static const int CSMOTIONPIN = 9;
    SnoozeTimer timer;
    SnoozeUSBSerial usb;
    SnoozeBlock config_teensyLC(usb, timer);
    SPIFlash flash(CSFLASHPIN);
    void setup() {
      SensorLIS.sampleRange = 4;
      SensorLIS.sampleMode = 10;
      SensorLIS.SampleRate = 0; //Sample rate 0 = sleep
    void loop() {
      timer.setTimer(1000);// milliseconds

  2. #2
    NEVERMIND! Apparently my scope just wonky. Maybe time for a new one...

    Have a nice day!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts