This simple example shows how to use the Sleep manager.
The sleep manager API can be found here.
The example has been tested on the STK600 kit.
This example puts the device to sleep in sleep modes with increasing "depth" and utilizes the external interrupt to wake it up again.
For measuring the current consumption in various sleep mode, an ammeter can be connected on JS2 of ATmega128RFA1-EK1 kit.
The device will remain in ACTIVE mode for approximately 3 seconds after wake- up, before it goes to sleep in the next mode.
The Yellow Led in ATmega128RFA1-EK1 is On when the device is in active mode and is in off state during sleep. Pressing the pushbutton on the kit will wake the device up and goes to next sleep mode in the following order. Idle mode. Power Down mode. Power Save mode. Standby mode. Extended Standby mode.
This software was written for the GNU GCC and IAR for AVR. Other compilers may or may not work.
For further information, visit Microchip.