User manual

Low-power Application Kit (Oryx) - User’s Guide
Page 27
Copyright 2012 © Embedded Artists AB
5.2 Typical Software Architecture for Low-Power
When creating an application that uses low-power modes there is a typical design pattern to be used.
while (condition for having this particular function active)
{
//prepare for low-power mode (set I/O pins in specific states)
//make sure active interrupts can wake up processor
//enter power save mode (sleep/deep-sleep/power-down)
//check what irq that occurred, handle task if not done in irq
}
The ISR (Interrupt Service Routine) can service the peripheral that caused the interrupt or leave it to
the main forever loop to handle before entering sleep again. The ISR can for example set a flag that
the forever main loop can detect and service the appropriate event accordingly.
It the power-down mode disables a specific peripheral it might be necessary for the ISR to re-initialize
the peripheral. The same can be valid for the forever main loop after waking up from low-power mode.
When using deep power down mode the program structure is quite different since the processor wakes
up like after a reset.
main()
{
//normal initialization of hw
if (cold reset)
//reset application variables
else if (wake up from deep power down)
//initialize application based on previous deep power down
//continue with application
//at some point in time, enter deep power down again...
}
5.3 The Board Current Consumption
This section describes the different on-board peripherals and their current consumption.
5.3.1 The Board Low-Power Modes
Note that the board is not designed to take advantage of the Deep power down mode. The lowest
current consumption on the board is achieved when using Power down mode. Power consumption is
actually higher with Deep power down mode than with Power down mode. The reason for this is that
the board is designed to be “always powered”. Each individual component can be put in a very low-
power mode (either via command via serial bus or direct control via an input pin). In Deep power down
mode all pins of the LPC11U37 are in high-impedance mode, basically floating. Not controlling some
specific pins to specific states will increase the overall current consumption.
5.3.2 LCD
The LCD is a special type of LCD called memory LCD. Each pixel is a memory position. See datasheet
for details. The LCD requires a 0.5Hz signal, toggling a bit once a second. This bit is called VCOM in
the datasheet. On the board this is accomplished via a 3-byte SPI transfer. The duration for this is
48uS.