The DipCortex M0/M3 and WiFi are very flexible and in the right modes they operate at very lower power. The best method of saving power is to sleep the processor when it is not busy, for instance if your application is waiting for user input instead of keeping the processor awake in a loop awaiting input you can place it in to a sleep mode. The processor can then sleep until an interrupt occurs which could be from an external source or an internal timer.
The LPC11U24 & LPC1347 have four power modes.
- Sleep – Pauses the processor’s core, execution resumes upon the next interrupt. Internal clocks remain running. Any interrupt will wake up the processor.
- Deep sleep – Same as the sleep mode but the system clock to the core is disabled and analog blocks powered down. Wake up sources can be from selected GPIO interrupts, USB, watchdog.
- Power down – All clocks disabled, peripheral registers and SRAM is maintained. Wake up source are simular to deep sleep
- Deep power down – switches the processor off, all SRAM and peripheral register data is lost. GPREG0 to GPREG4 are the only registers that will keep their data while the processor is powered. The only way to resume is to remove power or pull the wake up line low. The wake up line must be externally pulled up or Deep power down will exit straight away.
Other power saving tips :
- Only enable the clock to the peripherals required
- Setup all the GPIO as inputs with pull ups, including inputs that don’t have pins. The same silicon is used in multiple packages so even though it is not accessible it still can draw power.
- Disable analog inputs
An mbed example project can be found here
LPCXpresso or Other Offline Compiler
An LPCXpresso example project coming soon.
Example GPIO config for minimal power use