Power Management for S32K14x

Similar documents
i.mxrt1060 Product Lifetime Usage Estimates

Migrating Applications from MC9S12VR64 to MC9S12VR32 by: Manuel Rodríguez

IMXPINSQSUG Quick Start Guide on Pins Tool for i.mx Processors

Differences Between S32K11x and S32K142

S12Z MagniV LIN Bootloader

Using VRC_CTL to Control an External VDD_LV Supply on the MPC5748G

Exception and fault checking on S32K1xx

S32K1xx Bootloader. 1. Introduction. 2. Architecture description. NXP Semiconductors. Application Notes Rev. 1, 10/2018. Contents

i.mx 6ULZ Migration Guide

QN9080 QN908x RF Certification Guide

How to Reduce SoC Power when Running M4 with A53 on i.mx8m

IMXPINSQSUG Pins Tool for i.mx Processors Installation User's Guide

Production Flash Programming Best Practices for S32K1xx MCUs

Using the PASS module in MPC5748G to implement password-based protection for flash and debugger access

S32R RADAR Signal Compression

Using MCUXpresso SDK CAN and LIN Drivers to Create a Bluetooth LE-CAN and Bluetooth LE-LIN Bridges on KW36/KW35

Window Lift and relay based DC motor control Reference Design Using the S12VR

etpu library usage in an application

Window Lift and relay based DC motor control Reference Design Using the S12VR(P)

Tampering Application for i.mx7dsabresd

Modular Gateway Hardware User's Guide

Mask Set Errata for Mask 2N27B

Simple Serial Bootloader for S12Z

S32 Design Studio for ARM v2.0

Mask Set Errata for Mask 3N86B

EEPROM Emulation with Qorivva MPC55xx, MPC56xx, and MPC57xx Microcontrollers

Migration Guide from MKW36Z512xxx4 to MKW35Z512xxx4

S32 Design Studio for Vision 2.0

TWR-KE18F User's Guide

Kinetis KE1xF512 MCUs

Enhanced Features in i.mx RT1060

Power Architecture e200z4 and e200z7 Core Memory Protection Unit (CMPU)

S32 Design Studio for Power Architecture 2017.R1

Component Development Environment Getting Started Guide

Freescale MKW40Z IEEE Software Quick Start Guide

Working around ERR7026 according to application needs

S12VR Hardware Design Guidelines

OpenSDA on TWR-KW2x. User s Guide Rev 1.1

S32V234: Clock Programming Considerations

i.mxrt1050 Product Lifetime Usage Estimates

Initializing the MPC574xP Clock Generation Module and Progressive Clock Switching Feature

P1010RDB-PB Quick Start Guide

S32R372141EVB User Guide

Power Consumption and Measurement of i.mx RT1020

MIMXRT1060 Evaluation Kit Board Hardware User's Guide

i.mx 6ULL Product Usage Lifetime Estimates

FRDM-KE04Z User s Guide User Guide

Quick Start Guide for the Freescale Freedom Development Platform FRDM-KL43Z

New VLE Instructions for Improving Interrupt Handler Efficiency Robert Moran Applications Engineer Microcontroller Solutions Group

KL03 Product Brief Supports all KL03 devices

S32K1xx ADC guidelines, spec and configuration

Quick Start Guide for FRDM-KL05Z

How to Implement USB Suspend/Resume Feature with MCUXpresso SDK USB Stack

Getting Started with the MCU Flashloader

i.mx 6UltraLite Product Usage Lifetime Estimates

Quick Start Guide for FRDM-KL46Z Rev 1

Qorivva MPC5744P Evaluation Board 144LQFP Expansion Board User s Guide Barbara Johnson Applications Engineering

Mask Set Errata for Mask 1N87P

Freedom FRDM-KV31F Development Platform User s Guide

Smart Plug Software Design Reference Manual

Getting Started with MCUXpresso SDK CMSIS Packs

i.mx 7 Dual/Solo Product Lifetime Usage

Quick Start Guide for FRDM-KL46Z Rev 1

TWR-KL28Z User s Guide

How to use FlexMemory as D-Flash and EEPROM in KE1xF

Mask Set Errata for Mask 2N36B

AN12282 Digital Signal Processing for NXP LPC5500 Using PowerQuad

CodeWarrior U-Boot Debugging

Kinetis KL2x Ultra-Low-Power MCUs with USB

Offline Flash Programmer for Kinetis K- and L-series MCUs

Hello, and welcome to this presentation of the STM32L4 power controller. The STM32L4 s power management functions and all power modes will also be

HVP-KV10Z32 User s Guide

FRDM-KL03Z User s Guide

SPI topics: watchdog, serial output and parity check

i.mx 8QuadXPlus MEK Board Hardware User's Guide

Emulating I2S bus on KE06

TWR-KV10Z32 Sample Code Guide for CodeWarrior Board configuration, software, and development tools

Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, C-Ware, the Energy Efficient Solutions logo, mobilegt, PowerQUICC,

TWR-LS1021A Getting Started

Kinetis KL1x General-Purpose Ultra-Low- Power MCUs Up to 256 KB Flash and 32 KB SRAM

QCVS Frame Distributor Wizard User Guide

AN4749 Application note

Software Solutions for Migration Guide from Aarch32 to Aarch64

Three-Phase Power Meter Hardware Design Reference Manual

TWR-LS1021A Getting Started

Measuring Interrupt Latency

Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C- Ware, the Energy Efficient Solutions logo, Kinetis,

Freescale, the Freescale logo, AltiVec, C-5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C-Ware, the Energy Efficient Solutions logo, Kinetis,

Kinetis KM3x Metrology MCUs based on ARM Cortex -M0+ Core

Using the Built-in Self- Test (BIST) on the MPC5744P

Emulating Dual SPI Using FlexIO

AND9407/D Low Power Techniques of LC Series for Audio Applications

TWR-KV10Z32 Sample Code Guide for IAR Board configuration, software, and development tools

CodeWarrior Development Studio for Advanced Packet Processing v10.3.1

Using the Asynchronous DMA features of the Kinetis L Series

Common Board Design between T1024 and T1022 Processor

Mask Set Errata for Mask 2N14W

Getting Started with Freescale MQX RTOS for Kinetis SDK and MDK-ARM Keil

MQX RTOS Release Notes for Kinetis SDK v1.2.0 for KL33Z64 for FRDM-KL43Z Freescale Freedom Development Platform

WCT1011A/WCT1013A Automotive MP-A9 V4.0 Run-Time Debugging

Transcription:

NXP Semiconductors Document Number: AN5425 Application Note Rev 0, 03/2017 Power Management for S32K14x by: NXP Semiconductors 1 Introduction The power consumption of devices and the implications around designing for low power are common topics currently. Increasing system level requirements does not allow for compromises on performance, but pushes for low energy budgets to extend product use times. The S32K14x family includes internal power management features that can be used to control the microcontroller s power usage and assist reaching the targets of embedded designs. This application note discusses how to use the power management system, provide use case examples and shows current measurement results for these cases. Tips are given for using each of the power modes available on S32K14x family. 2 Overview of power modes. The typical power modes in legacy cores and other embedded systems are Run, Wait and Stop. The ARM Cortex M4 and M0+ power modes are Run, Sleep and Deep Sleep. The extended power modes and their relationship with typical and ARM M4 and M0+ s modes are depicted in below figure Contents 1 Introduction... 1 2 Overview of power modes...1 2.1 ARM Cortex-M4 and M0+ power modes implementation...2 3 Power Modes description...3 3.1 Power mode transitions... 5 4 Clock Operation in low-power modes... 7 4.1 System Clock Generator (SCG) clocks... 7 4.2 Power Management controller (PMC)... 9 5 Power Mode Entry/Exit... 9 5.1 HSRUN mode entry... 10 5.2 HSRUN mode exit...10 5.3 VLPR mode entry... 11 5.4 VLPR mode exit...12 5.5 STOP and VLPS mode entry sequence...13 5.5.1 Stop1/2 mode entry...13 5.5.2 VLPS mode entry... 14 5.6 STOP and VLPS mode exit sequence... 15 6 Modules in power modes...15 7 Hardware and software considerations... 18 7.1 Hardware considerations..18 7.2 Software considerations... 18 7.3 Tips for making lowpower measurements on the bench Tips for making low-power measurements on the bench 7.3.1. External.... 19 7.3.1 External...19 7.3.2 Internal... 19 7.4 Current Consumption measurements...20

Overview of power modes. ARM Cortex-M4 and M0+ power modes implementation Figure 1. Power modes comparison 2.1 ARM Cortex-M4 and M0+ power modes implementation The ARM Cortex-M4 and M0+ cores have three primary modes of operation: Run, Sleep, and Deep Sleep. The Wait For Interrupt (WFI) instruction invokes sleep and deep sleep modes for the S32K14x chips. Figure 2. ARM Cortex M4 and M0+ architecture on page 3 shows the Cortex -M4 and M0+ low power implementation. The sleep and deep sleep states are architected in hardware to control the clock to the core and interrupt controller. When entering sleep, the NVIC logic remains active and interrupts or a reset wake the core from sleep. When entering deep sleep, an Asynchronous Wakeup Interrupt Controller (AWIC) is used to wake the MCU from a select group of sources. These sources are described in S32K14x device on Asynchronous Wake-Up Interrupt Controller (AWIC) Configuration section, for more details please check Core Overview chapter on S32K14x reference manual. Using the Sleep-On-Exit feature, the ARM Cortex cores have one more way to enter low power modes. In the System Control Block is a register called the System Control Register (SCR) that contains several control bits related to sleep operation. The SLEEPDEEP bit selects whether Sleep or Deep Sleep mode is selected. Setting the SLEEPONEXIT bit to 1, enables the processor to immediately enters sleep modes when it completes the execution of all exception handlers. For more information please refer to ARM Cortex-M4 Devices Generic User Guide. 2 NXP Semiconductors

Power Modes description ARM Cortex-M4 and M0+ power modes implementation Figure 2. ARM Cortex M4 and M0+ architecture 3 Power Modes description S32K14x provides multiple power option allowing users to optimize power consumption for the level of functionality needed. Depending on the user application s requirements, a variety of power modes are available that provide state retention, partial power down or full power down on certain logic and/or memory. Input / Output (I/O) states are maintain during all power modes for more information about module functionality in different power mode refer to chapter Modules in power modes on page 15 in this Application note or S32K14x reference manual. The following table compares the available power modes. Table 1. S32K14x power modes S32K14x mode Description Core mode Normal recovery method Normal Run High Speed Run (HSRUN) Default mode out of reset, onchip voltage regulator is on (internal supply is fully regulated). Allows maximum performance of the chip. In this mode, the chip can operate at a higher frequency as compared to Normal Run mode. Internal clocking requirements should be met. [1] Run - Run - Table continues on the next page... [1] Core and System clock must be 112 MHz or less, Bus clock must be programmed to 56 MHz or less and an integer divider of the core clock. Flash clock must be programmed to 28 MHz or less, the core clock to flash clock ratio is limited to a maximum value of 8 NXP Semiconductors 3

Power Modes description ARM Cortex-M4 and M0+ power modes implementation Table 1. S32K14x power modes (continued) S32K14x mode Description Core mode Normal recovery method Very Low Power Run (VLPR) On-chip voltage regulator is in a low power mode that supplies only enough power to run the chip at a reduced frequency. Reduced-frequency flash memory access mode (1 MHz) LVD is off SIRC provides a low power 4 MHz source for the core, the bus and the peripheral clocks. Run - Very Low Power Stop (VLPS) via WFI instruction Places the chip in a static state with Low voltage detect (LVD) operation off. This is the lowest-power mode in which the ADC and pin interrupts are functional. Deep Sleep Interrupt (or Reset) Some peripheral clocks are stopped.2 LPTMR and CMP can be used. NVIC is disabled. AWIC is used to wake from interrupt. The on-chip voltage regulator is in low power mode that supplies only the power needed to run the chip at a reduced frequency. All SRAM is operational (content is retained and I/O states are maintained). Table continues on the next page... 4 NXP Semiconductors

Power Modes description Power mode transitions Table 1. S32K14x power modes (continued) S32K14x mode Description Core mode Normal recovery method Stop 1 (via WFI instruction) Places the chip in static state. LVD protection is maintained. Deep Sleep Interrupt (or Reset) NVIC is disabled. AWIC is used to wake up from interrupt Some peripheral clocks are stopped. [2] The core clocks, system clocks and bus clock are all gated. Stop 2 (via WFI instruction) Places the chip in static state. LVD protection is maintained. Deep Sleep Interrupt (or Reset) NVIC is disabled. AWIC is used to wake up from interrupt Some peripheral clocks are stopped. Only the core and system clocks are gated, but the bus clock remains active. The bus masters and bus slaves clocked by the system clock enter stop mode, but the bus slaves clocked by the bus clock remain in run mode. The clock generators in the SCG and the PMC s onchip regulator also remain in Run mode. [3] 3.1 Power mode transitions The Figure 3. Power mode state transition diagram on page 6 shows the power mode transitions. Any reset always brings the chip back to Normal Run state. Depending on the needs of user application, a variety of stop modes are available that allow the state retention, partial power down or full power down of certain logic and/or memory. I/O states are held as well as registers retain their content in all modes of operation. [2] See Modules in power modes on page 15 chapter in this application note for more details. [3] The following can initiate an exit from STOP: Reset, an asynchronous interrupt from a bus master (valid also for STOP1) and A synchronous interrupt from a bus slave clocked by the bus clock (Valid only for STOP2) NXP Semiconductors 5

Power Modes description Power mode transitions Figure 3. Power mode state transition diagram Following table defines trigger for the various state transitions shown in the figure above. Table 2. Power modes transition triggers Transition From To Mode Transition Trigger Command/Condition 1 RUN STOP SMC_PMCTRL[RUNM] = 00, SMC_PMCTRL[STOPM] = 000 [4] following a WFI instruction [5] STOP RUN Interrupt [6] or Reset 2 RUN VLPR Set SMC_PMPROT[AVLP] = 1, SMC_PMCTRL[RUNM] = 0b10 [7] VLPR RUN Set SMC_PMCTRL[RUNM] = 00 or Reset. Table continues on the next page... [4] STOPO register must be configured to select the stop mode variant (STOP1 or STOP2). [5] Sleep-now (WFI instruction) or sleep-on-exit modes entered with SLEEPDEEP set, which is controlled in System Control Register in ARM core. [6] Module capable of providing an asynchronous interrupt to the device. [7] Core, System and Bus clock must be 4 MHz (maximum) and flash clock must be set to 1 MHz (maximum). Also, all asynchronous clock sources will be restricted to 4 MHz as configured SCG_SRICDIV. 6 NXP Semiconductors

Clock Operation in low-power modes System Clock Generator (SCG) clocks Table 2. Power modes transition triggers (continued) Transition From To Mode Transition Trigger Command/Condition 3 VLPR VLPS SMC_PMCTRL[STOPM] = 0b010, following a WFI instruction [5] VLPS VLPR Interrupt. Note: If VLPS was entered directly from RUN (Transition 4), hardware forces exit back to RUN and does not allow a transition to VLPR. 4 RUN VLPS SMC_PMPROT[AVLP] = 1, SMC_PMCTRL[STOPM] = 0b010, following a WFI instruction [5] VLPS RUN Interrupt and VLPS mode was entered directly from RUN or reset. 5 RUN HSRUN Set SMC_PMPROT[AHSRUN] = 1, SMC_PMCTRL[RUNM] = 0b11. HSRUN RUN Set SMC_PMCTRL[RUNM] = 00 or Reset. 4 Clock Operation in low-power modes There are several clock sources available in the MCU. To conserve power, most module clocks can be turned off by configuring the CGC field of the peripheral control register in the PCC module. 4.1 System Clock Generator (SCG) clocks The clocks for the MCU are generated by the System Clock Generator (SCG) module. Figure 4. Clocking diagram on page 8 shows block diagram of SCG module. NXP Semiconductors 7

Clock Operation in low-power modes System Clock Generator (SCG) clocks Figure 4. Clocking diagram The clock generation circuitry provides several clock dividers and selectors allowing different modules to be clocked at a specific frequency for that module. Four main clock sources (Besides Low Power Oscillator LPO module) can be seen on SCG module: Fast Internal Reference Clock (FIRC), Slow Internal Reference Clock (SIRC) System Oscillator (SOSC) and System PLL (SPLL). For Run modes, (HSRUN, normal RUN, VLPR) different sources can be used to provide clock signal to core. Figure 5. SCG Core clock valid mode transition diagram on page 9 shows all possible sources for core clock that can be used in different power modes. 8 NXP Semiconductors

Power Mode Entry/Exit Power Management controller (PMC) Figure 5. SCG Core clock valid mode transition diagram For other power modes, such as STOP and VLPS, as core clock is gated off, no source is used. When entering VLPR/VLPS mode, the System PLL must be disabled by software in RUN mode before making any mode transition. 4.2 Power Management controller (PMC) An internally-generated low power clock with typical frequency of 128 khz that can be used as clock source for modules operational in low power modes can be configured on Power Management Controller (PMC) module. Figure 4. Clocking diagram on page 8 shows the low power oscillator (LPO) source and its different derivations. 5 Power Mode Entry/Exit When entering, or exiting low-power modes, the system must confirm an orderly sequence to manage transitions safety. The SMC manages the system s entry into and exit from all power modes. NXP Semiconductors 9

Power Mode Entry/Exit HSRUN mode entry 5.1 HSRUN mode entry In HSRUN mode, the on-chip voltage regulator remains in a run regulation state, but with a slightly elevated voltage output. In this state, the MCU can operate at a faster frequency compared to normal RUN mode. While in this mode, the following restrictions must be adhered to: Transition from RUN to HSRUN can be made by setting SMC_PMCTRL to 0b11 after allowing HSRUN mode in SMC_PMPROT register. Next snippet code shows a basic RUN to HSRUN transition function. NOTE Flash programming/erasing is not allowed. No FTFC commands of any type, including CSE commands (for CSEc parts), are available when the chip is in this mode. NOTE Modifications to clock gating control bits are prohibited 5.2 HSRUN mode exit Transition from HSRUN to RUN mode can be made by either a Reset event or setting SMC_PMCTRL to 00. As in HSRUN mode core clock can be set to maximum value (112 MHz) and at RUN mode core clock is up to 80 MHz, it may be necessary to decrease the core frequency before jumping into RUN mode. Next snippet code shows a basic HSRUN to RUN transition function. 10 NXP Semiconductors

Power Mode Entry/Exit VLPR mode entry. As HSRUN mode allows MCU to run at maximum clock speed, be sure to adjust frequencies in SCG module to meet clock requirements for RUN mode. Please refer to Internal clocking requirements section in device Reference manual for these requirement. 5.3 VLPR mode entry In this state, regulator is designed to supply enough current to MCU over a reduced frequency. To reduce power consumption in this mode, disable the clocks for those unused modules in their corresponding PCC register. Before entering this mode, the following conditions must be met: All clock monitors in the SCG must be disabled Adjust the clock frequencies according their maximum allowed values: Core, System and Bus clock must be 4 MHz (maximum) and flash clock must be set to 1 MHz (maximum). Also, all asynchronous clock sources will be restricted to 4 MHz as configured SCG_SRICDIV. System PLL must be disabled. Mode protection must be set to allow VLP modes, that is, SMC_PMPROT[AVLP] to 1. SMC_PMCTRL[RUNM] must be set to 0b10 to enter VLPR. NXP Semiconductors 11

Power Mode Entry/Exit VLPR mode exit Next snippet code shows a basic RUN to VLPR transition function. NOTE Flash programming/erasing is not allowed. No FTFC commands of any type, including CSE commands (for CSEc parts), are available when the chip is in this mode NOTE Do not increase the clock frequency while in VLPR mode,because the regulator is slow in responding and cannot manage fast load transitions. In addition, do not modify the clock source in the SCG module or any clock divider registers. Module clock enables in the PCC can be set, but not cleared. NOTE To reduce MCU power consumption in low power modes, PMC_REGSC[BIASEN] bit should be set. This bit enables source and well biasing for the core logic in low power modes. This bit must be set to 1 when using Very Low Power (VLP) modes 5.4 VLPR mode exit To reenter normal RUN mode, clear SMC_PMCTRL[RUNM] bits. If a higher execution frequency is desired, poll PMSTAT until it is set to RUN and then configure SCG module as desired. Also, a reset event causes the MCU to come back to RUN mode. 12 NXP Semiconductors

Power Mode Entry/Exit STOP and VLPS mode entry sequence 5.5 STOP and VLPS mode entry sequence When entering stop/vlps mode, clocks are shut off in an orderly sequence to safely place the chip in the targeted low-power state. All low-power entry sequences are initiated by the core executing a WFI instruction. When entering low power modes, the chip performs the following steps: 1. The CPU clock is gated off immediately. 2. Requests are made to all non-cpu bus masters to enter Stop mode. 3. After all masters have acknowledged they are ready to enter Stop mode, requests are made to all bus slaves to enter Stop mode. 4. After all slaves have acknowledged they are ready to enter stop mode, system and bus clocks are gated off depending on the target mode VLPS/STOP1/STOP2. Note that, in STOP2 mode bus clocks will not be gated. 5. Additionally, for VLPS mode, clock generators are disabled in the SCG unless configured to be enabled. 6. The on-chip regulator in the PMC and internal power switches are configured to meet the power consumption goals for the targeted low-power mode. This step is valid only for VLPS and not for STOP as in STOP mode the PMC is in Run regulation. 5.5.1 Stop1/2 mode entry STOP1/2 mode is entered via the sleep-now or sleep-on-exit with the SLEEPDEEP bit set in the System control register in ARM Core. The SCG module can be configured to leave the reference clocks running. For STOP modes, all SCG clock are available (LPO, PLL, SIRC, FIRC and OSC). For more details, please check. Next snippet code shows a basic RUN to STOP1/STOP2 transition function. NXP Semiconductors 13

Power Mode Entry/Exit STOP and VLPS mode entry sequence 5.5.2 VLPS mode entry Transition to VLPS is almost the same as for Stop1/2 modes except allowing very low power modes in SMC_PMPROT register. Be sure to disable System PLL before VLPS mode entry. Next snippet code shows a basic RUN to VLPS transition function. NOTE To reduce MCU power consumption in low power modes, PMC_REGSC[BIASEN] bit should be set. This bit enables source and well biasing for the core logic in low power modes. This bit must be set to 1 when using Very Low Power (VLP) modes. 14 NXP Semiconductors

Modules in power modes STOP and VLPS mode exit sequence 5.6 STOP and VLPS mode exit sequence Exit from a low-power stop mode is initiate either by a reset or an interrupt event. To restore the system to a run mode (RUN or VLPR), the following steps needs to be executed: 1. The on-chip regulator in the PMC, clock generators and internal power switches are restored. This step is valid only for VLPS and not for STOP as in STOP mode the PMC is in Run regulation. 2. System and bus clocks are enabled to all masters and slaves. 3. The CPU clock is enabled and the CPU begins servicing the reset or interrupt that initiated the exit from the low-power stop mode. 6 Modules in power modes Table 3. Terms and abbreviations on page 15, defines some frequently-used term and abbreviations in Table 4. Module operation in available low power modes on page 15. Table 4. Module operation in available low power modes on page 15 illustrates module functionality in each of the available modes. These tables (both Table 3 and table 4) are taken from S32K14x s reference manual, chapter 34 Power Management. Table 3. Terms and abbreviations Term Async operation FF Low Power Powered Wake-up Definition Fully functional with alternate clock source (if the selected clock source remains enabled). Full functionality. In VLPR the system frequency is limited, but if a module does not have a functional limitation, it is still listed as FF. Memory is powered to retain contents in a lower-power state. Module and clock sources are disabled. Memory is powered to retain contents. Modules can serve as a wake-up source for the chip. Table 4. Module operation in available low power modes Module HSRUN RUN VLPR [8] STOP1/2 VLPS [8] Core Modules NVIC FF FF FF System Modules System Mode Controller / Power Management Controller FF FF FF FF FF Table continues on the next page... [8] PMC_REGSC[BIASEN] must be set to 1 when using VLP* modes NXP Semiconductors 15

Modules in power modes STOP and VLPS mode exit sequence Table 4. Module operation in available low power modes (continued) Module HSRUN RUN VLPR [8] STOP1/2 VLPS [8] Regulator Run regulation Run regulation Stop regulation Run regulation Stop regulation LVD/LVR Both Active Both Active LVD Disabled / LVR active Both Active LVD Disabled / LVR active Brown-out Detection FF FF FF FF FF DMA FF FF FF Async Operation Async Operation Watchdog FF FF FF (Only SIRC and LPO clock as Async Operation (STOP bit needs to be set) STOP1, FF in STOP2 Asyn Operation (STOP bit needs to be set) Async Wakeup EWM FF FF FF (Only SIRC and LPO clock as Clocks Static in STOP1, FF in STOP2 128 khz LPO FF FF FF FF FF System PLL FF FF FF SIRC FF FF FF FF FF FIRC FF FF FF System Oscillator (SOSC) FF FF FF SCG All clock sources are available All clock sources are available Only SIRC is available All clock sources are available Only SIRC is available Core Clock 112 MHz max (PLL as 80 MHz max (PLL as 4 MHz max (SIRC as System Clock 112 MHz max (PLL as 80 MHz max (PLL as 4 MHz max (SIRC as Bus Clock 56 MHz max (PLL as 40 MHz max (PLL as / 48 MHz max (FIRC as 4 MHz max (SIRC as in STOP1, Available in STOP2 Flash Clock 28 MHz max (PLL as 26.67 MHz max (PLL as 1 MHz max (SIRC as in STOP1, Available in STOP2 Memory and Memory Interfaces Table continues on the next page... [8] PMC_REGSC[BIASEN] must be set to 1 when using VLP* modes [8] PMC_REGSC[BIASEN] must be set to 1 when using VLP* modes 16 NXP Semiconductors

Modules in power modes STOP and VLPS mode exit sequence Table 4. Module operation in available low power modes (continued) Module HSRUN RUN VLPR [8] STOP1/2 VLPS [8] Flash memory Only read operation can be done. No program/ erase FF Only read operation can be done. No program/ erase Low power (no read and program/ erase) System RAM (SRAM_U and SRAM_L) FF FF Low power (read and write operation) Cache FF FF Low power (read and write operation) FlexMemory FF FF Low power (read and write operation) [9] Communication Interfaces LPUART FF FF FF (Only SIRC as LPSPI FF FF FF (Only SIRC as LPI2C FF FF FF (Only SIRC as FlexIO FF FF FF (Only SIRC as FlexCAN FF FF FF (Only SIRC as Safety Async operation in STOP1, FF in STOP2 Async operation in STOP1, FF in STOP2 Async operation in STOP1, FF in STOP2 Async operation in STOP1, FF in STOP2 PNET supported in both STOP1 and STOP2 for FlexCAN0 CRC FF FF FF in STOP1, Available in STOP2 Timers FTM FF FF FF (Only SIRC as Table continues on the next page... [9] lexram enabled as emulated EEPROM is not writable in VLPR and writes are ignored. Read accesses to FlexRAM as emulated EEPROM while in VLPR are allowed. There are no access restrictions for FlexRAM configured as traditional RAM. NXP Semiconductors 17

Hardware and software considerations Hardware considerations Table 4. Module operation in available low power modes (continued) Module HSRUN RUN VLPR [8] STOP1/2 VLPS [8] LPIT FF FF FF (Only SIRC as PDB FF FF FF (Only SIRC as LPTMR FF FF FF (Only SIRC as RTC FF FF FF (Only SIRC as Analog Async operation in STOP1, FF in STOP2 Async operation in STOP1, FF in STOP2 Async operation in STOP1, FF in STOP2 Async Operation 12-bit ADC FF FF in Stop1, FF in Stop2 CMP [10] FF FF LS compare only HS or LS compare FF in STOP2 LS compare only Human Machine Interface GPIO/PORT FF FF FF Async operation in STOP1, FF in STOP2 7 Hardware and software considerations To reduce MCU power consumption, there are some hints that you can follow: 7.1 Hardware considerations All unused pins in application (especially analog functionality) should follow some recommendations to eliminate possible current consumption increase: DAC output pin should be floating. ADC pins should be grounded. 7.2 Software considerations To conserve power, most module clocks can be turned off by configuring the CGC field of the peripheral control register in the PCC module. These fields are cleared after any reset, which disables the peripheral clock of the corresponding module. Be sure to disable the module before turning off the clock. [8] PMC_REGSC[BIASEN] must be set to 1 when using VLP* modes [10] In Stop or VLPS modes, the CMP supports high-speed or low-speed external pin-to-pin or external-pin-to-dac compares. Windowed, sampled & filtered modes of operation are not available while in stop or VLPS modes. 18 NXP Semiconductors

Hardware and software considerations Tips for making low-power measurements on the bench Tips for making low-power measurements on the bench 7.3.1. External. Several peripherals support Peripheral Doze mode. In this mode, a register field can be used to disable the peripheral for the duration of a low-power mode. 7.3 Tips for making low-power measurements on the bench Tips for making low-power measurements on the bench 7.3.1. External. 7.3.1 External The suggestions below address the most common issues encountered when trying to duplicate the data sheet current specs. When using a digital multimeter (DMM), use "Manual Range Mode." Using a DMM with an auto-ranging function enabled may cause LVD and POR resets. This is most common when you are exiting from one of the low-power modes like LLS or VLPS back to Run. The DMM has changed the range to a micro-amp or nano-amp range while the MCU is in the low-power mode and the sudden inrush of current requires the DMM to change range. The range change does not happen fast enough and the MCU starves and pulls the VDD level below the LVD or POR limits. Disconnect the debugger and power cycle the MCU. With the JTAG debugger is attached, the MCU may have the debugger module in the MCU active, clocking and consuming power. The external debugger hardware may also load the I/O of the JTAG port when attached. Thus, your low-power measurements will be higher than expected. Isolate the MCU VDDs. If you want to measure the current draw of the MCU, then remove the other IC and component networks that are sourced by the voltage supply sourcing the MCU. For example, some EVBs have a potentiometer connected between MCU_VDD and ground. A 5 K potentiometer across a 3.6 V supply pulls 720 μa. This is huge when considering that the MCU consumes around dozens μa in lowest power modes. Match impedance of inputs. If the impedance of high speed signals (fast edge transitions) are not well matched, then the signals can "ring" and exceed the VDD supply of the device. This can result in the signal providing current to the device through the input protection diodes. This is particularly true for high speed input clocks. This issue can result in negative IDD measurements while in the lowest power modes. Match voltage levels. Although the MCU input pins are 5 V tolerant on some parts, when the MCU goes into the lowpower modes, measurement of the current through MCU_VDD will be affected by any input higher than MCU_VDD. The higher input pin will back power the MCU through the input pin, resulting in negative IDD reading in low-power modes. Reduce pin loading of the MCU. When the MCU sources current through the output pins, the power is being sourced through MCU_VDD. This is most evident when you output high frequency signals to an output pin as you might with the external memory interfaces such as clock and address/data pins. 7.3.2 Internal Below is a list of the most common issues that can prevent you from getting to the lowest data sheet current specs. Watchdog is not disabled, causing resets. Disable or service the watchdog. The clock monitor is not disabled which may cause resets. Disable all clock monitors. A crystal oscillator is enabled in low power mode. The RTC oscillator, typically consumes <500 na of current. The CLKOUT signal is being output to a pin. Any pin that is constantly changing state will draw power. The requested low-power mode is not allowed with a corresponding bit in the PMPROT register. For example, if AVLP is not set in the PMPROT and the WFI instruction is executed, you won t enter Stop mode. The clock gate for a module is not enabled before it is read or written. This causes a reset before the MCU tries to enter the low-power mode. NXP Semiconductors 19

Hardware and software considerations Current Consumption measurements The clock gate for a module that must acknowledge the mode controller mode entry request is turned off prior to low-power mode entry. This will result in a Stop Mode Acknowledge reset. Failure to un-comment out the call to the stop or sleep function after debugging is complete will keep you in the higher run current mode. The frequency of wake-up events is too high, which means that the MCU spends more time in Run or VLPR mode than in a low-power mode. The transition time from low-power mode to Run mode is quick. If the MCU only spends 9 ms in run and 1 ms in a low-power mode, the average current of the system will be considerably higher than if the MCU was running only 1 ms every 1 second. The MCU is running at a much higher frequency than is needed to accomplish the work. Throttle the clock with the SCG dividers or reduce the clock. Obviously, the higher the MCU frequency the higher the IDD of the MCU. Reduce the clock and lower the Run or Wait current. However, there is some trade-off. If the current of Run mode can be tolerated, then getting work done as quickly as possible and going right back to low power mode is more advantageous than running a slower clock in Run mode. An input pin is floating without an internal or external pull device. This can result in 50-80 ua of current per pin. This include the JTAG or SWD pins. Disable the JTAG pins on PORTA or properly terminate the inputs. 7.4 Current Consumption measurements As current consumption depends on different factors such as temperature condition, which modules are enabled, operating frequency, etc it is hard to provide a simple current value for each mode. Please refer to MVCU's datasheet where different test conditions are included. 20 NXP Semiconductors

How To Reach Us Home Page: nxp.com Web Support: nxp.com/support Information in this document is provided solely to enable system and software implementers to use NXP products. There are no express or implied copyright licenses granted hereunder to design or fabricate any integrated circuits based on the information in this document. NXP reserves the right to make changes without further notice to any products herein. NXP makes no warranty, representation, or guarantee regarding the suitability of its products for any particular purpose, nor does NXP assume any liability arising out of the application or use of any product or circuit, and specifically disclaims any and all liability, including without limitation consequential or incidental damages. Typical parameters that may be provided in NXP data sheets and/or specifications can and do vary in different applications, and actual performance may vary over time. All operating parameters, including typicals, must be validated for each customer application by customer's technical experts. NXP does not convey any license under its patent rights nor the rights of others. NXP sells products pursuant to standard terms and conditions of sale, which can be found at the following address: nxp.com/ SalesTermsandConditions. NXP, the NXP logo, NXP SECURE CONNECTIONS FOR A SMARTER WORLD, COOLFLUX, EMBRACE, GREENCHIP, HITAG, I2C BUS, ICODE, JCOP, LIFE VIBES, MIFARE, MIFARE CLASSIC, MIFARE DESFire, MIFARE PLUS, MIFARE FLEX, MANTIS, MIFARE ULTRALIGHT, MIFARE4MOBILE, MIGLO, NTAG, ROADLINK, SMARTLX, SMARTMX, STARPLUG, TOPFET, TRENCHMOS, UCODE, Freescale, the Freescale logo, AltiVec, C 5, CodeTEST, CodeWarrior, ColdFire, ColdFire+, C Ware, the Energy Efficient Solutions logo, Kinetis, Layerscape, MagniV, mobilegt, PEG, PowerQUICC, Processor Expert, QorIQ, QorIQ Qonverge, Ready Play, SafeAssure, the SafeAssure logo, StarCore, Symphony, VortiQa, Vybrid, Airfast, BeeKit, BeeStack, CoreNet, Flexis, MXC, Platform in a Package, QUICC Engine, SMARTMOS, Tower, TurboLink, and UMEMS are trademarks of NXP B.V. All other product or service names are the property of their respective owners. ARM, AMBA, ARM Powered, Artisan, Cortex, Jazelle, Keil, SecurCore, Thumb, TrustZone, and μvision are registered trademarks of ARM Limited (or its subsidiaries) in the EU and/or elsewhere. ARM7, ARM9, ARM11, big.little, CoreLink, CoreSight, DesignStart, Mali, mbed, NEON, POP, Sensinode, Socrates, ULINK and Versatile are trademarks of ARM Limited (or its subsidiaries) in the EU and/or elsewhere. All rights reserved. Oracle and Java are registered trademarks of Oracle and/or its affiliates. The Power Architecture and Power.org word marks and the Power and Power.org logos and related marks are trademarks and service marks licensed by Power.org. C 2017 NXP B.V.