LowPower_Teensy3 and external power

Wizzard

New member
Hello.
Have possible bug, use this lib to hibernate teensy and then wake using low power clock. When USB connected it works as expected it is sleep then wake call callback then sleep again.
But when switch off USB and connect to external power supply it do nothing at all, and i cant make it work. Simple application like led blink work ok with external battery.
Code:
 TEENSY3_LP LP = TEENSY3_LP();
sleep_block_t* LP_config;
void sleep_mode() {
 
  LP_config = (sleep_block_t*) calloc(1,sizeof(sleep_block_t)); 
  LP_config->modules = (LPTMR_WAKE);  
  LP_config->lptmr_timeout = 6000;  
  LP_config->callback = callbackhandler;  
  LP.Hibernate(LP_config);
}

void setup() {
  sleep_mode();
}
 
void loop() {
}

void callbackhandler() {
 
  //blink led here
}
 
Oh i get it its because of frequency, i should set 16Mhz but i cant do it from teensyduino because lowPower not compatible, i should set it using LP.CPU() function inside my application only.
 
Good to hear, I'm actually making an all new simplified low power library called Snooze which is compatible with all CPU settings through the IDE. Actually I got rid of the CPU function so you just use the IDE to set the CPU speed instead. Its still in the very early stages but I do have one example and more when I get some time.
 
Hm now strange thing if i use only LED blink in callback it consume 0.250mA but if i use any pin in callback, then in hibirnate it consume 1mA, i cant understand why, already tried different pin state before hibirnate, but 1mA anyway after first wakeup..
 
Back
Top