Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Common API for Sleep Management / Example for EVK1105 Documentation

Introduction

This simple example shows how to use the Sleep manager.

Main files:

  • sleepmgr_example_uc3a_uc3b.c: Sleep manager example application
  • conf_example.h: configuration of I/O pins

Sleep manager API

The sleep manager API can be found here.

Device Info

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.

Description of the example

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.

Compilation Info

This software was written for the GNU GCC and IAR for AVR. Other compilers may or may not work.

Contact Information

For further information, visit Microchip.
Support and FAQ: https://www.microchip.com/support/