APPLICATION NOTE. Atmel AT03782: Using Low Power Modes in SAM4N Microcontroller. Atmel 32-bit Microcontroller. Features.

Similar documents
APPLICATION NOTE. AT03498: Low Power Modes in SAM3 Family. Atmel AT91 ARM Cortex Microcontrollers. Introduction

APPLICATION NOTE. Atmel AVR1638: XMEGA RTC Calibration. 8-bit Atmel Microcontrollers. Features. Introduction

AVR1518: XMEGA-A1 Xplained Training - XMEGA Clock System. 8-bit Atmel Microcontrollers. Application Note. Prerequisites.

APPLICATION NOTE. Atmel AT03304: SAM D20 I 2 C Slave Bootloader SAM D20. Description. Features

APPLICATION NOTE. AT03324: Atmel REB212BSMA-EK Quick Start Guide. Atmel MCU Wireless. Introduction

APPLICATION NOTE. Atmel AT01080: XMEGA E Schematic Checklist. Atmel AVR XMEGA E. Features. Introduction

APPLICATION NOTE. Atmel AVR057: Internal RC Oscillator Calibration for ATtiny4/5/9/10/20/40. 8-bit Atmel Microcontrollers. Features.

Atmel AVR1619: XMEGA-B1 Xplained Demonstration. 8-bit Atmel Microcontrollers. Application Note. Features. 1 Introduction

Hardware Prerequisites Atmel Xplained Pro Evaluation Kit Atmel WINC1500 extension USB Micro Cable (TypeA / MicroB)

Atmel AVR32847: Migration from/to the UC3L0 64/32/16 from/to the UC3L0 256/ bit Atmel Microcontrollers. Application Note.

OLED display with pixels resolution Ambient light sensor CPU load Analog filter Quadrature Encoder with push button Digital I/O

APPLICATION NOTE. Atmel AT02260: Driving AT42QT1085. Atmel QTouch. Features. Description

APPLICATION NOTE. Atmel AT03160: Migrating Bootloader from ATxmega128A1 to other Atmel XMEGA Devices. Atmel AVR XMEGA. Features.

APPLICATION NOTE. Atmel AVR536: Migration from ATmega644 to ATmega644A. 8-bit Atmel Microcontrollers. Introduction

STK521. User Guide B AVR 01/12

Atmel QT600 Quick Start Guide Touch Solutions

Getting Started with the SAM4L-EK Demo

USER GUIDE. Wireless Production Test Reference Protocol Specification Document. Atmel MCU Wireless. Description

AVR32917: picopower Board getting started. 32-bit Microcontrollers. Application Note. Preliminary. Features. 1 Introduction

APPLICATION NOTE. Atmel AVR3009: Driving QTouch Device with I 2 C Interface. Atmel QTouch. Introduction

Atmel LF-RFID Kit Comparison Chart. Application Note. Atmel LF-RFID Kit Comparison Chart. 1. Description

Section 5 SERCOM. Tasks SPI. In this section you will learn:

Atmel AT697F. Rad-Hard 32-bit SPARC v8 Processor ERRATA SHEET. Active Errata List

Atmel ATMXT143E touchscreen controller Capacitive touch ITO 320 x 240 pixel LCD display with SPI interface LED backlight

OLED display Sensors readout. Light sensor Temperature sensor

AVR4018: Inertial Two (ATAVRSBIN2) Hardware User's Guide. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

Atmel AVR ATxmega384C3 microcontroller OLED display with 128x32 pixels resolution Analog sensors. Ambient light sensor Temperature sensor

APPLICATION NOTE. Atmel AVR116: Wear Leveling on DataFlash. 32-bit Atmel Microcontrollers. Features. Description. Wear leveling

AVR134: Real Time Clock (RTC) Using the Asynchronous Timer. Features. Introduction. AVR 8-bit Microcontrollers APPLICATION NOTE

32Kbytes on-chip SRAM. Viterbi decoding and CRC PRIME compliant 128-bit AES encryption Channel sensing and collision pre-detection

Atmel AVR1924: XMEGA-A1 Xplained Hardware User's Guide. 8-bit Atmel Microcontrollers. Application Note. Preliminary. Features.

APPLICATION NOTE. Atmel AVR2131: Lightweight Mesh Getting Started Guide. Atmel MCU Wireless. Features. Description

Atmel AT697F. Rad-Hard 32-bit SPARC v8 Processor ERRATA SHEET. Active Errata List

APPLICATION NOTE. AT11008: Migration from ATxmega16D4/32D4 Revision E to Revision I. Atmel AVR XMEGA. Introduction. Features

AVR1303: Use and configuration of IR communication module. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR1503: Xplain training - XMEGA Programmable Multi Interrupt Controller 8-bit Microcontrollers Application Note Prerequisites

Atmel AVR1926: XMEGA-B1 Xplained Getting Started Guide. 8-bit Atmel Microcontrollers. Application Note. Features. 1 Introduction

AVR532: Migration from ATmega48/88/168 to ATmega48A/88A/168A. 8-bit Microcontrollers. Application Note. 1 Introduction

Atmel AVR473: ATAVRSB202 Hardware User Guide. 8-bit Atmel Microcontrollers. Application Note. Features. 1 Introduction

a clock signal and a bi-directional data signal (SCL, SDA)

USER GUIDE EDBG. Description

AVR1922: Xplain Board Controller Firmware 8-bit Microcontrollers Application Note Features 1 Introduction

AVR097: Migration between ATmega128 and ATmega1281/ATmega bit Microcontrollers. Application Note. Features. 1 Introduction

AVR32752: Using the AVR32 UC3 Static Memory Controller. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

One-channel Toggle-mode Touch Sensor IC with Power Management Functions AT42QT1012. Summary

8-bit Microcontroller with 16K Bytes In-System Programmable Flash. ATtiny87 ATtiny167 Automotive

Atmel CryptoAuthentication Starter Kit

AT11512: SAM L Brown Out Detector (BOD) Driver. Introduction. SMART ARM-based Microcontrollers APPLICATION NOTE

AVR1501: Xplain training XMEGA Timer/Counter 8-bit Microcontrollers Application Note Prerequisites 1 Introduction

AVR42772: Data Logger Demo Application on XMEGA A1U Xplained Pro. Introduction. Features. AVR XMEGA Microcontrollers APPLICATION NOTE

AT91 ARM Thumb-based Microcontroller. Application Note. AT91SAM7X and AT91SAM7XC Microcontroller Series Schematic Check List. 1.

Atmel AT32UC3A3256 microcontroller 64MBit SDRAM Analog input (to ADC) Temperature sensor RC filter

SAM4 Reset Controller (RSTC)

AT91 ARM Thumb Microcontrollers. Application Note. AT91M55800A Clock Switching Considerations using Advanced Power Management Controller.

AT03975: Getting Started with SAM L21. Descripton. Features. SMART ARM-Based Microcontroller APPLICATION NOTE

AT60142H/HT. Rad-Hard 512Kx8 Very Low Power CMOS SRAM ERRATA-SHEET. Active Errata List. Errata History. Abbreviations. 1.

AVR42789: Writing to Flash on the New tinyavr Platform Using Assembly

EDBG. Description. Programmers and Debuggers USER GUIDE

Embedded AVR Microcontroller Including RF Transmitter and Immobilizer LF Functionality for Remote Keyless Entry ATA5795. Summary.

AVR1315: Accessing the XMEGA EEPROM. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

APPLICATION NOTE. AT6486: Using DIVAS on SAMC Microcontroller. SMART ARM-Based Microcontroller. Introduction. Features

Native route discovery algorithm

APPLICATION NOTE. AT04470: Differences between SAM D21 Variants A, B, and L. 32-bit Microcontroller. Introduction

AVR32401: AVR32 AP7 Linux Interfacing DataFlash. 8-bit Microcontrollers. Application Note. Features. 1 Introduction

AVR32901: EVKLCD100/EVKLCD101 Hardware User's Guide. 32-bit Microcontrollers. Application Note. Features. 1 Introduction

APPLICATION NOTE. Atmel AT03261: SAM D20 System Interrupt Driver (SYSTEM INTERRUPT) SAM D20 System Interrupt Driver (SYSTEM INTERRUPT)

AVR1508: Xplain training - XMEGA DAC 8-bit Microcontrollers Application Note Features 1 Introduction

AT09381: SAM D - Debugging Watchdog Timer Reset. Introduction. SMART ARM-based Microcontrollers APPLICATION NOTE

AT91 ARM Thumb Microcontrollers. Application Note. Migrating to an AT91SAM9G20-based System from an AT91SAM9260-based System. 1. Scope. 2.

AVR1512: XMEGA-A1 Xplained training - XMEGA Basics. 8-bit Atmel Microcontrollers. Application Note. Prerequisites. 1 Introduction

AT06467: Getting started with SAM D09/D10/D11. Features. Description. SMART ARM-based Microcontrollers APPLICATION NOTE

AT91 ARM Thumb Microcontrollers. Application Note. AT91 Host Flash Loader. 1. Package Contents. 2. Definition of Terms. 3.

ATAES132A Firmware Development Library. Introduction. Features. Atmel CryptoAuthentication USER GUIDE

Asynchronous SRAM Operating Voltage: 5V Read Access Time: 40 ns Write Cycle Time: 30 ns Very Low Power Consumption (Pre-RAD)

8-megabyte, 4-megabyte, and 2-megabyte 2.7-volt Only DataFlash Cards AT45DCB008D AT45DCB004D AT45DCB002D. Not Recommended for New Design

APPLICATION NOTE. How to Securely Switch Atmel s LIN Transceiver ATA6662/ATA6662C to Sleep Mode ATA6662/ATA6662C. Concerning Atmel ATA6662

CAN Microcontrollers. Application Note. Migrating from T89C51CC01 to AT89C51CC03. Feature Comparison

AT03262: SAM D/R/L/C System Pin Multiplexer (SYSTEM PINMUX) Driver. Introduction. SMART ARM-based Microcontrollers APPLICATION NOTE

AVR based 125kHz RFID Evaluation Kit (Re)Programming Guide ATA2270-EK1. Overview. Fuse Settings: ISP Programming

8-bit Microcontroller with 2K/4K/8K Bytes In-System Programmable Flash. Appendix A. Preliminary. ATtiny261 ATtiny461 ATtiny861 Automotive

SAM4L Asynchronous Timer (AST)

USER GUIDE. Atmel QT1 Xplained Pro. Preface

SBAT90USB162 Atmel. SBAT90USB162 Development Board User s Manual

Atmel AVR ATxmega384C3 microcontroller OLED display with pixels resolution Analog sensors. Ambient light sensor Temperature sensor

AT91 ARM Thumb Microcontrollers. Application Note. Using the ECC Controller on AT91SAM9260/9263 and AT91SAM7SE Microcontrollers. 1.

QTouch 8-key Touch Sensor IC AT42QT1085. Summary

LBAT90USB162 Atmel. LBAT90USB162 Development Board User s Manual

Ethernet1 Xplained Pro

CAN, 80C51, AVR, Microcontroller. Application Note

AVR32 UC3 Software Framework... User Manual

AT697E. Application Note. Checking AT697E Code for Occurrence of LDF/FPOPd Instructions Sequence with a dependency on an Odd-Numbered Register

APPLICATION NOTE. AT07216: SAM G55 Schematic Checklist. Atmel SMART SAM G55. Introduction

APPLICATION NOTE. AT06863: SAM4L Peripheral Event Controller (PEVC) SAM4L Peripheral Event Controller (PEVC) ASF PROGRAMMERS MANUAL

APPLICATION NOTE. Atmel AVR3005: Low Power QTouch Design. Atmel QTouch. Features. Introduction

AN2202 Application note

APPLICATION NOTE. Atmel QT4 Xplained Pro User Guide ATAN0114. Preface

AT21CS Series Reset and Discovery. Introduction. Serial EEPROM APPLICATION NOTE

Non Volatile Rad Hard Reprogrammable FPGA. ATF280 SRAM-based FPGA AT69170 Serial EEPROM. 2x SRAM-based FPGA designed for Space use - ATF280

ATDH2200E Programming Kit... User Guide

8-bit Microcontroller. Application Note. AVR320: Software SPI Master

Transcription:

APPLICATION NOTE Atmel AT03782: Using Low Power Modes in SAM4N Microcontroller Atmel 32-bit Microcontroller Features Low power modes in SAM4N Power supply in SAM4N Introduction The purpose of this application note is to explain how to use low power modes in the Atmel SAM4N microcontroller. The application note gives a brief description of low power modes in SAM4N and system controller for reducing power consumption. It includes how to enter and exit each low power mode, also gives some suggestions on using these low power modes in application.

Table of Contents 1. Low Power Modes in SAM4N... 3 2. Power Supply... 3 2.1 Supply Controller (SUPC)... 3 2.2 General Purpose Backup Registers (GPBR)... 5 2.3 Power Management Controller (PMC)... 5 2.3.2 2.3.3 Clock Sources... 6 Clock Configurations... 6 3. Sleep Mode... 8 3.1 Enter Sleep Mode... 8 3.2 Exit Sleep Mode... 8 3.3 Using Sleep Mode... 8 4. Wait Mode... 9 4.1 Enter Wait Mode... 9 4.2 Exit Wait Mode... 9 4.3 Using Wait Mode... 10 5. Backup Mode... 11 5.1 Enter Backup Mode... 11 5.2 Exit Backup Mode... 11 5.3 Using Backup Mode... 11 2

1. Low Power Modes in SAM4N The SAM4N microcontroller series has various low power modes, including sleep mode, wait mode and backup mode. Those low power modes are shown in Figure 1-1. Each low power mode can be entered from active mode and wake up by related enabled wake-up event. The various low power modes will be described below in detail. The Atmel Software Framework (ASF) provides API to implement low power mode functions. Figure 1-1. Various Low Power Modes 2. Power Supply For reducing power consumption, the system can use supply controller (SUPC) to control the supply voltage and use power management controller (PMC) to control the clock of the system. 2.1 Supply Controller (SUPC) The SUPC controls the supply voltage of the system and manages the backup mode by controlling the embedded voltage regulator. The SUPC starts up the device by enabling the voltage regulator. Then it generates the proper reset signals to the core power supply. The SUPC integrates the Slow Clock generator which is based on a 32kHz crystal oscillator and an embedded 32kHz RC oscillator. The Slow Clock defaults to the RC oscillator, but the software can enable the crystal oscillator and select it as the Slow Clock source. The SUPC embeds a supply monitor which is located in the VDDIO power supply and which monitors VDDIO power supply. The supply monitor can be used to prevent the processor from falling into an unpredictable state if the main power supply drops below a certain level. Figure 2-1 gives an overview of the Supply Controller of SAM4N. The device can be divided into two power supply areas: Backup Power Supply and Core Power Supply. There are several types of power supply pins: VDDCORE: power the core, including the processor, the embedded memories and the peripherals; voltage ranges from 1.08V to 1.32V. VDDIO: power the peripherals I/O lines; voltage ranges from 1.62V to 3.6V. VDDIN: voltage regulator, ADC and DAC power supply; voltage ranges from 1.6V to 3.6V. VDDPLL: powers main oscillator; voltage ranges from 1.08V to 1.32V. 3

Figure 2-1. Supply Controller of SAM4N 4

2.2 General Purpose Backup Registers (GPBR) The device embeds eight 32-bit general-purpose backup registers which can store 32 bytes of user application data. When system enters backup mode, the voltage regulator is disabled, and VDDCORE is off but the backup registers remain powered by VDDIO. They retain the content when the system wakes up from backup mode. It is possible to generate an immediate clear of the content of general purpose backup registers 0 to 3 (first half), if a low power debounce event is detected on a wakeup pin, WKUP0 or WKUP1. The content of the other generalpurpose backup registers (second half) remains unchanged. If a tamper event has been detected, it is not possible to write into general purpose backup registers while the LPDBCS0 or LPDBCS1 flags are not cleared in supply controller status register (SUPC_SR). 2.3 Power Management Controller (PMC) The PMC controls all system and peripheral clocks as shown in Figure 2-2. It can be used to adapt the system frequency and to enable/disable the peripheral clocks. It acts an important role for optimizing power consumption. Figure 2-2. General Clock Block Diagram of SAM4N 5

2.3.2 Clock Sources Normally, the system does not need to run at device s maximum frequency. According to requirement of system performance, proper Master Clock (MCK) needs to be found for optimizing power consumption. The user can choose one of the following clocks as master clock source from clock generator. Slow clock Main clock PLL clock 2.3.2.1 Slow Clock The Slow Clock is generated either by the Slow Clock Crystal Oscillator or by the Slow Clock RC Oscillator. The selection between the RC and the crystal oscillator is made by writing the XTALSEL bit in the SUPC Control Register (SUPC_CR). 2.3.2.2 Main Clock The Main Clock has two sources: 4/8/12MHz Fast RC Oscillator, which starts very quickly and is used at startup. 3 to 20MHz Crystal or Ceramic Resonator-based Oscillator, which can be bypassed. The user can select the source of Main Clock by writing the MOSCSEL bit in the Clock Generator Main Oscillator Register (CKGR_MOR). The software can enable or disable the 4/8/12MHz Fast RC Oscillator with the MOSCRCEN bit in the CKGR_MOR. The user can also select the output frequency of the Fast RC Oscillator through MOSCRCF bits in CKGR_MOR, either 4MHz, 8MHz or 12MHz are available. The software can enables or disable the 3 to 20MHz Crystal or Ceramic Resonator-based oscillator with the MOSCXTEN bit in the CKGR_MOR. The Main Crystal Oscillator can be bypassed by setting MOSCXTBY and an external clock must be connected on XIN. 2.3.2.3 PLL Clock The PLL Clock signal has a frequency that depends on the Main Clock frequency and on the parameters DIV and MUL. The factor applied to the source signal frequency is (MUL + 1) / DIV. For example, the Main Clock frequency is 8MHz, and MUL = 24, DIV = 1, then the PLL Clock frequency is 8 * (24 + 1) / 1 = 200MHz. 2.3.3 Clock Configurations 2.3.3.1 Master Clock The Master Clock Controller can configure the master clock (MCK) as shown in Figure 2-3. Figure 2-3. Master Clock Controller 6

The Master Clock is selected from one of the Clock Source: Slow Clock, Main Clock and PLL Clock. The Master Clock selection is made by writing the Clock Source Selection field (CSS) in Master Clock Register (PMC_MCKR). The prescaler supports the division by a power of 2 of the selected clock between 1 and 64, and the division by 3. The PRES field in PMC_MCKR programs the prescaler. 2.3.3.2 Processor Clock The Processor Clock can be disabled by executing the WaitForInterrupt (WFI) processor instruction. The Processor Clock HCLK is enabled after a reset and is automatically re-enabled by any enabled interrupt. The Processor Sleep Mode is achieved by disabling the Processor Clock, which is automatically re-enabled by any enabled fast or normal interrupt, or by the reset of the product. 2.3.3.3 Peripheral Clock The peripheral clocks are automatically disabled after a reset. The user can individually enable and disable the clock on the peripherals by writing into the Peripheral Clock Enable 0 (PMC_PCER0) and Peripheral Clock Disable 0 (PMC_PCDR0) registers. In order to reduce power consumption, it is recommended to disable the clock of unused peripherals. 2.3.3.4 Programmable Clock Output The PMC controls 3 signals to be output on external pins, PCKx. Each signal can be independently programmed via the Programmable Clock Registers (PMC_PCKx). PCKx can be independently selected between the Slow Clock (SLCK), the Main Clock (MAINCK), the PLLA Clock (PLLACK), and the Master Clock (MCK) by writing the CSS field in PMC_PCKx. Each output signal can also be divided by a power of 2 between 1 and 64 by writing the PRES (Prescaler) field in PMC_PCKx. Each output signal can be enabled or disabled by writing 1 in the corresponding bit, PCKx of PMC_SCER and PMC_SCDR, respectively. 7

3. Sleep Mode In Sleep mode, the execution of instructions is suspended because the core clock is stopped while the peripheral clocks can be enabled. The purpose of sleep mode is to optimize power consumption of the device versus response time. The core needs lowest wakeup time in this mode. 3.1 Enter Sleep Mode Sleep mode is entered via WaitForInterrupt (WFI) instructions. This mode is achieved by disabling the core clock using PMC. Following API could be used to enter sleep mode in ASF: pmc_enable_sleepmode() When Sleep mode is entered, the current instruction is finished before the clock is stopped, but this does not prevent data transfers from other masters of the system bus. 3.2 Exit Sleep Mode Sleep mode is exited from an interrupt if WFI instruction is used to enter this mode, or by the reset of the device. The PMC automatically re-enables the processor clock and the core executes the next instruction of the program counter. 3.3 Using Sleep Mode In most applications, there are some polling loops for waiting for operation finish. For example, you need to send a large amount of data via USART, the pseudo code might like this: SendDataViaUSART() { Begin to send data via USART by PDC; Wait for transfer finish; Continue to execute next operation; } There are two ways for waiting for transfer finish: Polling loops, like while (transfer not finish) {1} Enter sleep mode and set the core be woken up by an interrupt when transfer finish. By using polling loops, the instructions are still executed thereby increasing power consumption. By using Sleep mode, the core clock is stopped thereby reducing power consumption while USART peripheral clock is still working, so data transfer continues. When the transfer finishes, an interrupt will wake up the core immediately. So in the case of the core is not running while waiting for peripherals transfer data done (with PDC), it is recommended to use the Sleep mode instead of polling loops. 8

4. Wait Mode The purpose of the wait mode is to achieve very low power consumption while maintaining the whole device in a powered state for a startup time of less than few hundred μs. Current consumption in wait mode is typically few μa (total current consumption) if the internal voltage regulator is used. In this mode, the clocks of the core, peripherals and memories are stopped. However, the core, peripherals and memories power supplies are still powered. From this mode, a fast start-up is available. 4.1 Enter Wait Mode Wait mode is entered via WAITMODE =1 (wait mode bit in CKGR_MOR). The Fast RC Oscillator is disabled by the PMC automatically when entering wait mode. The step of entering Wait mode as below: Select the 4/8/12MHz fast RC oscillator as Main Clock Set the FLPM bit field in the PMC Fast Startup Mode Register (PMC_FSMR) Set Flash Wait State at zero. Set the WAITMODE bit = 1 in the PMC Main Oscillator Register (CKGR_MOR) Wait for Master Clock Ready MCKRDY=1 in the PMC Status Register (PMC_SR) Note: Internal main clock resynchronization cycles are necessary between the writing of MOSCRCEN bit and the effective entry in wait mode. Depending on the user application, waiting for MOSCRCEN bit to be cleared is recommended to ensure that the core will not execute undesired instructions. In most applications, the external XTAL oscillator is used instead of on-chip RC oscillator for accurate clock. Before entering wait mode, it needs switch MCK from external XTAL oscillator to Fast RC oscillator. Switching Main Clock source will cause MCK unstable, so switching MCK source to stable Slow Clock is necessary before this operation. After Main Clock becomes stable, it needs switch MCK source back to Main Clock. The implementation is by calling following API: pmc_switch_mck_to_sclk(pmc_mckr_pres_clk_1); pmc_switch_mainck_to_fastrc(ckgr_mor_moscrcf_4_mhz); pmc_switch_mck_to_mainck(pmc_pck_pres_clk_1); Note: PMC_MCKR_PRES_CLK_1 indicates the master clock is equal to selected clock. CKGR_MOR_MOSCRCF_4_MHz indicates the main clock is selected to 4MHz Fast RC oscillator. The following API could be used to enter wait mode in ASF: 4.2 Exit Wait Mode pmc_enable_waitmode() Wait mode can be exited from several asynchronous fast start-up sources that have to be programmed prior to entering this mode, include: WKUP0-15 pins RTT or RTC alarm As soon as the fast start-up signal is asserted, the PMC automatically restarts the embedded 4/8/12MHz fast RC oscillator, switches the master clock on this 4/8/12MHz clock and re-enables the processor clock, the core executes the next instruction of the program counter. 9

4.3 Using Wait Mode Some applications are not running all the time. For example, an alarm application waits for signal from a sensor to wake up the microcontroller to launch a task. In this case, the microcontroller can be suspended during idle time and woken up in time when specific event happens. Both Sleep mode and Wait mode may be used for reducing power consumption. Some main factors should be considered: Wake-up source Power consumption Wake-up time If the wakeup source is an interrupt in the application, only Sleep mode can be used because Wait mode can only be woken up by programmed events. For power consumption, in Wait mode, current consumption is typically few μa when the internal voltage regulator is used. In Sleep mode, current consumption depends on master clock and peripherals in usage. The current consumption in Sleep mode is as low as Wait mode only when the master clock is running at 500Hz with all peripherals clock off. The higher the master clock frequency is, the higher power consumption in Sleep mode. The microcontroller can be woken up in several μs in both Sleep and Wait mode. When waking up from Sleep mode, the core clock is re-enabled by PMC automatically. But in Wait mode, it needs more time. When waking up from Wait mode, the PMC automatically restarts the embedded 4/8/12MHz fast RC oscillator, switches the master clock to this clock. Normally, user needs to switch master clock to PLL clock to get higher frequency. In short, the trade-off between wakeup time and power consumption must be taken into account when both Sleep mode and Wait mode can be used in the application. Generally, Wait mode can save more power than Sleep mode but Sleep mode has faster startup time than Wait mode. 10

5. Backup Mode The purpose of backup mode is to achieve the lowest power consumption in a system but not requiring fast startup time. Backup mode is based on the ARM Cortex -M4 deep-sleep mode with the voltage regulator disabled (no power supply for VDDCORE and VDDPLL). The core power supply domain is powered off and the SRAM, flash memory, PLL and peripherals are also switched off. The backup power supply domain is still powered so the Supply Controller, zero-power power-on reset, RTT, RTC, Backup registers and 32 khz oscillator are running. 5.1 Enter Backup Mode Backup mode is entered by using the VROFF bit of Supply Controller (SUPC_CR) and with the SLEEPDEEP bit in the Cortex-M4 System Control Register set to 1. The following API could be used to enter Backup Mode in ASF. pmc_enable_backupmode() 5.2 Exit Backup Mode Backup mode can be exited from several wake-up sources that must first be programmed prior to entering this mode, including: WKUPEN0-15 pins (level transition, configurable debouncing) RTC alarm RTT alarm Supply Monitor alarm When waking up from Backup mode, the program execution restarts in the same way as system startup except backup region (RTC, RTT, GPBR and Supply Controller) are not reset. 5.3 Using Backup Mode In some applications, very low power consumption is necessary. In this case, the Backup mode can be considered. In Backup mode, RTT and RTC can keep running and some important data can be stored in GPBR. Please make sure that the backup supply domain is still powered when entering Backup mode. 11

6. Revision History Doc.Rev Date Comments 42154A 07/2013 Initial revision 12

Atmel Corporation 2325 Orchard Parkway San Jose, CA 95131 USA Tel: (+1)(408) 441-0311 Fax: (+1)(408) 487-2600 www.atmel.com Atmel Asia Limited Unit 01-5 & 16, 19F BEA Tower, Millennium City 5 418 Kwun Tong Road Kwun Tong, Kowloon HONG KONG Tel: (+852) 2245-6100 Fax: (+852) 2722-1369 Atmel Munich GmbH Business Campus Parkring 4 D-85748 Garching b. Munich GERMANY Tel: (+49) 89-31970-0 Fax: (+49) 89-3194621 Atmel Japan G.K. 16F Shin-Osaki Kangyo Building 1-6-4 Osaki Shinagawa-ku, Tokyo 141-0032 JAPAN Tel: (+81)(3) 6417-0300 Fax: (+81)(3) 6417-0370 2013 Atmel Corporation. All rights reserved. / Rev.: Atmel, Atmel logo and combinations thereof, Enabling Unlimited Possibilities, and others are registered trademarks or trademarks of Atmel Corporation or its subsidiaries. ARM and Cortex are registered trademarks of ARM Ltd. Other terms and product names may be trademarks of others. Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN THE ATMEL TERMS AND CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE, ATMEL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS AND PROFITS, BUSINESS INTERRUPTION, OR LOSS OF INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and products descriptions at any time without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in, automotive applications. Atmel products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life.