Snooze library: attachInterrupt wakes up Teensy from hibernate

OK, cloned new version and sketch works properly on T3.6 @180mhz

However, on T3.5 sketch is still not coming out of hibernate when pin 10 is grounded ??
Ok thanks for testing all this out it really helps, I'll take a look today.
 
Duff: link is broken toward Snooze/tree/master/utility ... duff2013/Snooze/archive/v6.2.4.zip?

I see this was done and undone: kinetis_hsrun_enable(); , I had wondered about that being disabled in snooze some months back - not that I knew it would do this ...
That code is safely ifdef'd in the core to only appear where needed: #if defined(HAS_KINETIS_HSRUN) && F_CPU > 120000000
I didn't read the manual close enough, can't go into any of the Low Leakage Sleep Modes in HSRUN.
 
OK, cloned new version and sketch works properly on T3.6 @180mhz

However, on T3.5 sketch is still not coming out of hibernate when pin 10 is grounded ??
Can you try with this sketch below? My T3.5 is working with pin 10 as wakeup pin with hibernate. You have to ground pin 23 after waking to get out if the while loop.
Code:
#include <Snooze.h>
#define but_pin 23
#define but2_pin 10
volatile boolean flag = true;


SnoozeDigital  digital;
SnoozeBlock config_teensy35(digital);


void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
  digital.pinMode(but2_pin, INPUT_PULLUP, FALLING);
  pinMode(but_pin, INPUT_PULLUP);
  attachInterrupt(but_pin, button_int, FALLING);
}


void loop() {
  
  digitalWrite(LED_BUILTIN, HIGH);
  Snooze.hibernate( config_teensy35 );
  digitalWrite(LED_BUILTIN, LOW);
  flag = true;
  while (flag == true) {
    digitalWrite(LED_BUILTIN, HIGH);
    delay(200);
    digitalWrite(LED_BUILTIN, LOW);
    delay(200);
  }
  delay(500);
}


void button_int() {
  flag = false;
}
 
Nope, your sketch behaved the same. on my T3.5, LED never goes off when i ground pin 10. I've tried using pin 12 instead of 10 .... nope? Since sketch works on T3.6 and T3.2, is there something wrong with my T3.5? is it a "bounce" problem -- i'm just grounding a jumper (no button)

Actually, i have 2 T3.5's, and behavior is the same on both.

Added a 5s timer. confirmed timer worked on T3.2 and T3.6. Does not work on T3.5?
 
Last edited:
Nope, your sketch behaved the same. on my T3.5, LED never goes off when i ground pin 10. I've tried using pin 12 instead of 10 .... nope? Since sketch works on T3.6 and T3.2, is there something wrong with my T3.5? is it a "bounce" problem -- i'm just grounding a jumper (no button)

Actually, i have 2 T3.5's, and behavior is the same on both.

Added a 5s timer. confirmed timer worked on T3.2 and T3.6. Does not work on T3.5?
pin 12 is not wakeup pin. I just did the same with grounding the pin and it works, I tried pin 11 also which works.

My T3.5 I have to make sure the USB cable is pulling the USB connector down for the Teensy to get power and work. Not sure if its the connector or the solder joint that causes this. This is the same for T3.6 also.
 
OK, i tried with pin 11. Nope. But the fact that the timer is not bringing T3.5 out of hibernate precludes any pin problems.... ????
 
It works for me :: Very confusing - it has no USB ... of course . . . I thought it failed to program.
On my T_3.5 with zipped from github (my post #26)

powers up with ON LED
Tap pin 10 to USB connector and I get BLINK LED <edit> : Pin23 will not wake to BLINK LED
Tap pin 23 to USB connector and get LED ON

----
With LED on - tap Pin 23 to USB connector - no change.
 
Last edited:
Burned same sketch to T_3.6 : Boots to LED ON - Either pin 10 or 23 wakes from BLINK ON - but only 23 puts it back to LED ON/sleep?
>> Win_10, IDE 1.8.1, TD 1.36b1 @180 MHz as FASTER+LTO or just FAST

(funny note): same Pin_23 'bouncing' touch and release can wake and return to sleep if not held until blink starts.
 
Last edited:
A mystery to me. sketch works with pin 10 or timer on T3.6 and T3.2, but LED just stays on when testing on either of my T3.5s. I checked bootloader version (1.03) and that seems ok. Both T3.5s have female headers (for Ether shield testing).

EDIT
I installed 1.8.1 and 1.35, and T3.5 is working now... whatever.:)
 
Last edited:
@duff,
I ran snooze tests with LC. For sleep/deepSleep/hibernate meter showed 2+ma. From old LC beta test thread, one needs to set pin 17 OUTPUT LOW. When I did that, things worked 950/190/4.3 ua for the tests. Looks like snooze lib in 2015 might have been managing pin 17 for LC, but not now? Maybe at least need a comment in github README about LC pin 17?
 
@duff,
I ran snooze tests with LC. For sleep/deepSleep/hibernate meter showed 2+ma. From old LC beta test thread, one needs to set pin 17 OUTPUT LOW. When I did that, things worked 950/190/4.3 ua for the tests. Looks like snooze lib in 2015 might have been managing pin 17 for LC, but not now? Maybe at least need a comment in github README about LC pin 17?
Good catch I'll fix that soon.
 
Back
Top