ATAVRXPLAIN Atmel, ATAVRXPLAIN Datasheet - Page 9

KIT EVAL FOR ATXMEGA128A1

ATAVRXPLAIN

Manufacturer Part Number
ATAVRXPLAIN
Description
KIT EVAL FOR ATXMEGA128A1
Manufacturer
Atmel
Series
AVR® XMEGAr
Type
MCUr
Datasheets

Specifications of ATAVRXPLAIN

Contents
Board
Silicon Manufacturer
Atmel
Core Architecture
AVR
Silicon Core Number
ATmega128A1
Silicon Family Name
AVR XMEGA
Kit Contents
Board
Rohs Compliant
Yes
For Use With/related Products
ATXMEGA128A1
Lead Free Status / RoHS Status
Lead free / RoHS Compliant

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
ATAVRXPLAIN
Manufacturer:
Atmel
Quantity:
2
3.2 Sleep Example
4 Sleep manager
4.1 Purpose
4.2 Operation
8267B-AVR-12/10
consumption for the different Atmel
the following modes, staying for 8 seconds in each:
• ACTIVE
• IDLE
• POWER-SAVE
• POWER-DOWN
Note that the device will stay in POWER-DOWN, since an external interrupt is
required to wake the device up from this sleep mode.
All the
device is woken up at 5 second intervals, held in ACTIVE for half a second, then put
to sleep in POWER-SAVE or POWER-DOWN mode. The user may build on this
example for his/her application.
For this application note, a sleep manager has been implemented. Centralized control
of sleep is necessary in applications that consist of several firmware modules that
require different sleep modes depending on their status or activity level. Otherwise,
one would risk that the firmware modules disrupted each other’s operation.
The sleep manager resides in
and can be accessed via the following four functions:
Prior to use, the sleep manager must be initialized to ensure correct operation.
It then keeps track of which sleep mode is allowable by the use of locks. This is
simply a list of values, with a one-to-one correspondence with a list of sleep modes
that are defined at compile-time. The firmware modules may individually lock and
unlock the sleep modes (increase/decrease the locks’ values) to prevent the sleep
manager from putting the device in “too deep” sleep, i.e., modes that would interfere
with the modules’ operation.
When the sleep manager is requested to put the device to sleep, it searches through
the locks for the first non-zero value. The device is then put to sleep in the mode
which this lock corresponds to. Consequently, the order of the locks must be such
that the deeper sleep modes come later. If no locks have been set after initialization,
the sleep manager will default to the deepest sleep mode. Interrupts are disabled to
prevent the locks from changing during this search. Any pending interrupts will cause
the device to instantly wake up again.
void SLEEPMGR_Init( void );
void SLEEPMGR_Lock( SLEEPMGR_mode_t mode );
void SLEEPMGR_Unlock( SLEEPMGR_mode_t mode );
void SLEEPMGR_Sleep( void );
sleep_example.c
examples are meant as “code skeletons”. By default, the
sleepmgr.c
®
AVR
®
XMEGA
,
sleepmgr.h
®
devices. The code steps through
and
config_sleepmgr.h
AVR1010
9
,

Related parts for ATAVRXPLAIN