Snooze Issues on Teensy 3.2

Status
Not open for further replies.

SySt

Member
I am using the Snooze library to put my Teensy 3.2 to sleep but I am encountering a few issues.

Firstly, in the SnoozeBlock.pinMode() function I can only directly assign the pin number. So SnoozeBlock.pinMode(23, INPUT_PULLUP, FALLING); works but SnoozeBlock.pinMode(iPin, INPUT_PULLUP, FALLING); where iPin is defined as: int iPin = 23; does not work. Why would this be?

Secondly, upon waking I can't get the Teensy to communicate via serial over the USB port. Is there any way to re enable the USB port to make this work? I've also found that if I try to call Serial.println(); after waking it seems to lock up the Teensy. If I can't get the USB port to work after waking I may need to look at a different method to conserve power. My application is a data logger for a motorcycle. For a few reasons I want to keep the Teensy powered so simply switching the power won't cut it. What have you guys found you have been able to get the current draw down to without the Snooze library?
 
Hi,

One thing what i did in a gps project with teensy 3.1 was going down in cpu frequncy.
My runtime on a single lion 18650 cell more than doubled. Maybe an option?

Regards, Otto
 
Hi,

One thing what i did in a gps project with teensy 3.1 was going down in cpu frequncy.
My runtime on a single lion 18650 cell more than doubled. Maybe an option?

Regards, Otto

Were you able to change the CPU frequency via code while your program was running or did it need to be selected prior to compiling? I definitely need full processing speed while the logger is logging but reducing CPU speed while waiting to start a log would certainly be acceptable.
 
I am using the Snooze library to put my Teensy 3.2 to sleep but I am encountering a few issues.

Firstly, in the SnoozeBlock.pinMode() function I can only directly assign the pin number. So SnoozeBlock.pinMode(23, INPUT_PULLUP, FALLING); works but SnoozeBlock.pinMode(iPin, INPUT_PULLUP, FALLING); where iPin is defined as: int iPin = 23; does not work. Why would this be?

Secondly, upon waking I can't get the Teensy to communicate via serial over the USB port. Is there any way to re enable the USB port to make this work? I've also found that if I try to call Serial.println(); after waking it seems to lock up the Teensy. If I can't get the USB port to work after waking I may need to look at a different method to conserve power. My application is a data logger for a motorcycle. For a few reasons I want to keep the Teensy powered so simply switching the power won't cut it. What have you guys found you have been able to get the current draw down to without the Snooze library?
It doesn't matter if you use Snooze or not USB will be an issue, since the clocks for USB are shut down by hardware. As far as the PIN mode stuff what sleep mode are you using -> Snooze.sleep, Snooze.deepSleep or Snooze.hibernate? Pin 23 is not not wakeup pin for deepSleep or hibernate.
 
It doesn't matter if you use Snooze or not USB will be an issue, since the clocks for USB are shut down by hardware. As far as the PIN mode stuff what sleep mode are you using -> Snooze.sleep, Snooze.deepSleep or Snooze.hibernate? Pin 23 is not not wakeup pin for deepSleep or hibernate.

Would a possible solution to the USB issue be to use a software reset on the Teensy upon waking? I can make that work for me.

I am using pin 23 for Snooze.sleep. As I said, it works if I use this code:
SnoozeBlock.pinMode(23, INPUT_PULLUP, FALLING);

But it doesn't work with this code:
int iPin =23;
SnoozeBlock.pinMode(iPin, INPUT_PULLUP, FALLING);
 
Can you upgrade to version 6 Snooze here.

Would a possible solution to the USB issue be to use a software reset on the Teensy upon waking? I can make that work for me.
a reset would work.
I am using pin 23 for Snooze.sleep. As I said, it works if I use this code:
SnoozeBlock.pinMode(23, INPUT_PULLUP, FALLING);

But it doesn't work with this code:
int iPin =23;
SnoozeBlock.pinMode(iPin, INPUT_PULLUP, FALLING);
Just checked with version 6 and this worked for me.
 
Last edited:
Status
Not open for further replies.
Back
Top