chipKIT® Development Platform

Inspired by Arduino™

Low power modi, on fly clock change

Created Tue, 11 Jun 2013 09:28:11 +0000 by pito


pito

Tue, 11 Jun 2013 09:28:11 +0000

Hi, is there a library for changing the clock speed on fly, or a library for low power modi (something like "sleep" or "narcoleptic" in arduino), available?


majenko

Tue, 11 Jun 2013 10:05:48 +0000

I'm not aware of one, but one should be simple enough to craft. Entering sleep mode is simple enough - making sure it wakes up again is the trick ;)

An entire "power management" library would be nice. Switching to secondary osc for low speed operation, disabling / enabling different peripherals, etc. Maybe even incorporating it into the core rather than having it as a library would be good - then things that are clock sensitive (millis() / micros(), delay(), UART baud rate etc) can be automagically reconfigured on the fly when the clock frequency changes.


pito

Tue, 11 Jun 2013 11:31:09 +0000

Such library would be nice to have. Running it @90mA all the time is wasting the Earth's energy resources.. :mrgreen:


majenko

Tue, 11 Jun 2013 12:03:25 +0000

Absolutely - energy I could be dedicating to bitcoin mining ;)