This simple example shows how to use the Sleep manager.
The sleep manager API can be found here.
All SAM series devices can be used. The example has been tested on the boards:
The device is put to sleep in sleep modes with increasing "depth", and is periodically woken up by the RTT_ALARM. The RTT_ALARM wakes the CPU every 5 seconds. The device will remain in ACTIVE mode for approximately 3 seconds after wake- up, before it goes to sleep in the next mode.
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. Other compilers may or may not work.
For further information, visit Microchip.
Support and FAQ: https://www.microchip.com/support/