This simple example shows how to use the Sleep manager.
The sleep manager API can be found here.
All AVR UC3 A0/A1/A3/A4 and UC3 B series devices can be used. The example has been tested on the EVK1100, EVK1101, EVK1104 and EVK1105 boards.
The device is put to sleep in sleep modes with increasing "depth", and is periodically woken up by the RTC or asynchronously by an external interrupt for the modes which also disable the RTC. The device will remain in ACTIVE mode for approximately 3 seconds after wake- up, before it goes to sleep in the next mode.
The RTC overflows after 1 second, and will then wake the device up. If the device remains in sleep (LED turned off), the device has gone into a too deep sleep mode for the RTC to operate. In this case, the user must wake the device up by applying a low-level on the external interrupt pin, e.g., by pushing a button connected to the pin (WAKE_BUTTON_EIC_PIN).
A pin (LED_ACTIVITY_STATUS_PIN) with, e.g., a LED connected is driven low when the device is active and driven high when the device is sleeping.
This software was written for the GNU GCC and IAR for AVR. Other compilers may or may not work.
For further information, visit Microchip.
Support and FAQ: https://www.microchip.com/support/