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.
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
}