User manual

AVR1010
11
8267B-AVR-12/10
The list of sleep modes is defined in config_sleepmgr.h. By default, the sleep
manager supports the following modes (in the order listed):
Idle
SLEEPMGR_IDLE
Extended standby –
SLEEPMGR_ESTDBY
Power-save
SLEEPMGR_SAVE
Standby
SLEEPMGR_STDBY
Power-down
SLEEPMGR_DOWN
If your application does not need all sleep modes, the list should be modified to save
both memory and execution time. Refer to the configuration file (
config_sleepmgr.h)
for information on how to modify the list.
5 Low Power Initialization
For convenience, a function that disables all the peripherals/modules and enables
pull-up on all available I/O pins is included. This puts an Atmel
®
AVR
®
XMEGA
®
in the
least power consuming configuration, with the exception of EEPROM and Flash
power reduction modes, when nothing but VCC and GND is connected.
The function,
LOWPOWER_Init(), supports all the different XMEGA families (A1, A3,
A3B, A4) and resides in
lowpower.c, lowpower.h and lowpower_macros.h.
Since this function is meant for XMEGAs with floating I/O pins, some custom
configuration may be necessary for measurement in other setups. Refer to
lowpower_macros.h for the actual example code.
6 Measurement Setup
The supplied code examples are meant for current measurements on either the
Xplain board, or in a setup where only VCC, GND and alternatively an external crystal
are connected to the device (I/O pins left floating). If the setup differs from these, it
may be necessary to change the pin configurations. Special considerations are noted
below.
6.1 Xplain Board
To measure on the Xplain evaluation board, the following modifications are necessary
to reduce power consumption:
Remove all jumpers from the board
Enable pull-down on pin 3 of PORTQ (disables audio amplifier)
Disable the input buffer on pin 1 of PORTB (potentiometer)
The two last points are done in the Xplain-specific example code. The Xplain board
features a 32kHz crystal, which is used to clock the RTC to minimize power
consumption.
Current measurements are done by connecting an Ampere-meter between the points
named IXM+ and IXM-. The shunt located between these measurement points must
be removed. The location of the measurement points and shunt is shown in Figure 6-
1.