Low Power Teensy 3.0

Status
Not open for further replies.

duff

Well-known member
What is the proper way to "shut off" unused peripherals like the ADC and RTC? Do i just need to turn off their clocks by clearing the bits in the SIM_SCGC6 register and where would it be best to clear these bits, in the mk20dx128.c ResetHandler(void) or in the sketch. I see that in the ResetHandler(void) function it will startup these clocks and initialize them, so I think could just stop them there and comment out the RTC initialization in mk20dx128.c and the ADC initialization in analog.c which seems a little brutish to me. I'm favoring a library that can turn on and off these and others peripherals.

I measured the default reset (teensy3 1.13) current consumption at:
24 MHz core, 24 MHz bus, 24 MHz flash ~19mA
48 MHz core, 48 MHz bus, 24 MHz flash ~25mA
96 MHz core, 48 MHz bus, 24 MHz flash ~31mA

with a sketch that does nothing i.e.
void setup() {

}

void loop() {

}

From what I have been reading about low power operation with the K20 its recommended that you turn off peripherals, lower clock speeds and use the various stop modes, which I've been working on but for later post.
 
Status
Not open for further replies.
Back
Top