Imagine you are the sole care-provider for a household full of babies all under the age of 3. Each and every single one of them requires you to tend their needs and desires. From feeding to going to the bathroom, from burping to changing their diapers, from bathing to putting them to nap/sleep to keeping them entertained, you are needed every single step of the way. Isn’t that just exhausting? Fast forward by a decade when they are grow to become teenagers – autonomy and self-sufficiency – in which they can all satisfy their own basic needs without your help, unless it’s an urgent matter. Now you have much more free time to read a book, surf the net, get a job, or take a nap.
In essence, this is what SleepWalking is all about in the realm of an Atmel MCU. Traditionally a technology found in the AVR architecture only, it is now incorporated into the ARM architecture as well. It is a feature that extends the concept of autonomous peripherals (babies) that operate independently of the CPU core (a parent or care-provider) during active mode, to actually keeping the peripherals functional when the system clock has been stopped. This is achieved by clocking the peripherals using the real‐time clock (RTC), instead of the system clock.
In the SAM4L, SleepWalking has been integrated into many of the peripherals, including the analog comparator, the ADC, the I2C, UART and the capacitive touch interface. It is then the peripheral that decides whether to wake the system, instead of the CPU waking periodically to carry out an interrupt service routine. With this feature, the need to wake the CPU reduces significantly thus allowing it to stay inactive for longer and more frequent and thereby conserving more energy.
For more information, check out this video for a more detailed explanation on SleepWalking. Please note: despite the AVR UC3 being used as an example in the video, the underlying fundamentals of how SleepWalking works and its benefits are the same as in the ARM SAM4L.
Pingback: Embarcados – Sua fonte de informações sobre Sistemas Embarcados ATMEL SAM G » Embarcados - Sua fonte de informações sobre Sistemas Embarcados
I have an application making use of a SAMD21 and I would like to put the controller into a sleep mode (as power efficient as possible) and just monitor one pin for an external interrupt to wake it. What would you suggest is the best way to configure the clocks to monitor for the external interrupt?