Infineon PSoC 4000S Manual

4 mcu low-power modes and power reduction techniques

Advertisement

Quick Links

AN86233
PSoC™ 4 MCU low-power modes and power
reduction techniques

About this document

Scope and purpose
AN86233 discusses how to use the PSoC™ 4 MCU low-power modes and features to operate at very low power
levels while retaining essential functionality. Major topics include the five power modes, PSoC™ Creator power
management functions, and other power-saving techniques and considerations. Three PSoC™ Creator example
projects are included to demonstrate various aspects of low-power programming.
Note:
PSoC™ Creator supports all PSoC™ 4 devices, but ModusToolbox™ software supports PSoC™
4S-series devices only. Supported devices are 4000S, 4100S,
max, and 4500s.
Intended audience
This application note is for anyone who uses PSoC™ 4 MCU devices.

Table of contents

About this document ....................................................................................................................... 1
Table of contents ............................................................................................................................ 1
1
Introduction .......................................................................................................................... 3
2
Power mode summary ............................................................................................................ 4
3
Low-power mode details ......................................................................................................... 6
3.1
Sleep mode .............................................................................................................................................. 6
3.1.1
Sleep mode wakeup sources ............................................................................................................. 6
3.1.2
Sleep mode transitions ...................................................................................................................... 7
3.1.3
Sleep mode use cases ........................................................................................................................ 7
3.2
Deep sleep mode ..................................................................................................................................... 7
3.2.1
Deep sleep mode wakeup sources .................................................................................................... 7
3.2.2
Deep sleep mode transitions ............................................................................................................. 7
3.2.3
Peripheral deep sleep configuration ................................................................................................. 8
3.2.4
Deep sleep mode use cases ............................................................................................................... 8
3.3
Hibernate mode with PSoC™ Creator ..................................................................................................... 8
3.3.1
Hibernate mode wakeup sources ...................................................................................................... 8
3.3.2
Hibernate mode transitions ............................................................................................................... 9
3.3.3
Hibernate mode use cases ................................................................................................................. 9
3.4
Stop mode with PSoC™ Creator .............................................................................................................. 9
3.4.1
Stop mode wakeup sources ............................................................................................................ 10
3.4.2
Stop mode transitions ..................................................................................................................... 10
3.4.3
Stop mode use cases........................................................................................................................ 10
4
Power mode wakeup summary ............................................................................................... 11
5
Power reduction techniques ................................................................................................... 12
5.1
Turn OFF peripherals in ModusToolbox™ software ............................................................................. 12
Application Note
www.infineon.com
Please read the Important Notice and Warnings at the end of this document
4100S
page 1 of 38
plus,
4100S plus
256KB,
4100S
001-86233 Rev. *I
2021-11-04

Advertisement

Table of Contents
loading

Summary of Contents for Infineon PSoC 4000S

  • Page 1: Table Of Contents

    Power mode wakeup summary ....................11 Power reduction techniques ....................12 Turn OFF peripherals in ModusToolbox™ software ................12 Application Note Please read the Important Notice and Warnings at the end of this document 001-86233 Rev. *I www.infineon.com page 1 of 38 2021-11-04...
  • Page 2 PSoC™ 4 MCU low-power modes and power reduction techniques Table of contents Turn OFF components in PSoC™ Creator ..................... 12 Run components at a lower speed ....................... 13 Reduce supply voltage .......................... 13 Use PSoC™ 4 MCU device to gate current paths................... 14 Use DMA to move data ..........................
  • Page 3: Introduction

    PSoC™ 4 MCU low-power modes and power reduction techniques Introduction Introduction PSoC™ 4 MCU low-power modes allow a reduction in overall power consumption while retaining essential functionality, especially when implemented with other power-saving features and techniques. This application note describes the device low-power modes, provides information on active mode power-saving methods, and discusses other low-power considerations.
  • Page 4: Power Mode Summary

    PSoC™ 4 MCU low-power modes and power reduction techniques Power mode summary Power mode summary PSoC™ 4 MCU features up to five power modes of operation. In order of power consumption and functionality, they are: active, sleep, deep sleep, hibernate, and stop. Table 1 lists the typical current and wakeup times for each power mode.
  • Page 5 PSoC™ 4 MCU low-power modes and power reduction techniques Power mode summary Table 2 PSoC™ 4 MCU power modes and resources availability Subsystem Active Sleep Deep sleep Hibernate Stop Retention Retention SRAM Retention Retention High-speed peripherals (SPI, UART, etc.) Retention Universal digital blocks (UDBs) Retention VDAC...
  • Page 6: Low-Power Mode Details

    PSoC™ 4 MCU low-power modes and power reduction techniques Low-power mode details Low-power mode details The ModusToolbox™ software environment currently supports PSoC™ 4 MCU devices that have sleep and deep sleep power modes. PSoC™ Creator supports all PSoC™ 4 MCU devices, with all power modes. ModusToolbox™ software and PSoC™...
  • Page 7: Sleep Mode Transitions

    PSoC™ 4 MCU low-power modes and power reduction techniques Low-power mode details 3.1.2 Sleep mode transitions ModusToolbox™ and PSoC™ Creator supply API functions to enter sleep. These functions configure the device for sleep. No other API calls are necessary. ModusToolbox™ software: Cy_SysPm_CPU_EnterSleep() –...
  • Page 8: Peripheral Deep Sleep Configuration

    PSoC™ 4 MCU low-power modes and power reduction techniques Low-power mode details PSoC™ Creator: – Sets the system into deep sleep power mode. If firmware attempts CySysPmDeepSleep() to enter this mode before the system is ready, then the device will go into sleep mode instead and automatically enter the originally intended mode when the hold-off expires.
  • Page 9: Hibernate Mode Transitions

    PSoC™ 4 MCU low-power modes and power reduction techniques Low-power mode details CySysPmGetResetReason() API function to determine if the reset was a wakeup from hibernate, or from some other reset condition. The following code shows how to define a non-initialized variable, and initialize it if the reset was not due to a hibernate wakeup.
  • Page 10: Stop Mode Wakeup Sources

    PSoC™ 4 MCU low-power modes and power reduction techniques Low-power mode details wake the device from stop mode. Currently, ModusToolbox™ software does not support any PSoC™ 4 MCU device that supports stop mode. Note: The PSoC™ 4000, 4000S, 4100S, 4100S plus, 4100S plus 256k, 4100S max, 4200DS, 4500S, 4700S, 4100PS and analog coprocessor product lines do not support stop mode.
  • Page 11: Power Mode Wakeup Summary

    PSoC™ 4 MCU low-power modes and power reduction techniques Power mode wakeup summary Power mode wakeup summary All power modes exit upon two conditions: power cycling or driving the reset input LOW. All states are lost in either case for all power modes. Table 3 provides a summary of the events and hardware that can be used to exit the current low-power mode and return to active mode.
  • Page 12: Power Reduction Techniques

    PSoC™ 4 MCU low-power modes and power reduction techniques Power reduction techniques Power reduction techniques In many applications, you can gain additional power reductions by properly managing PSoC™ 4 MCU blocks as well as powering down external components. This section presents some techniques for doing so. Turn OFF peripherals in ModusToolbox™...
  • Page 13: Run Components At A Lower Speed

    PSoC™ 4 MCU low-power modes and power reduction techniques Power reduction techniques /* <Check task status here.> */ /* Stop the Component. */ MyComponent_Stop(); Restart a component by calling its start function: /* Start the Component. */ MyComponent_Start(); Any component that must preserve its configuration data before powering down includes a _Sleep() function in its API.
  • Page 14: Use Psoc™ 4 Mcu Device To Gate Current Paths

    PSoC™ 4 MCU low-power modes and power reduction techniques Power reduction techniques Use PSoC™ 4 MCU device to gate current paths Your PCB may contain other components that draw power; the PSoC™ 4 MCU device can be used to control the current consumed by them.
  • Page 15: Use Dma To Move Data

    PSoC™ 4 MCU low-power modes and power reduction techniques Power reduction techniques Use DMA to move data You can save power any time you offload a task from the CPU and either halt the CPU or let it do something else in parallel.
  • Page 16: Other Low-Power Mode Considerations

    PSoC™ 4 MCU low-power modes and power reduction techniques Other low-power mode considerations Other low-power mode considerations This section presents tips, tricks, and recommendations related to the use of PSoC™ low-power modes. Clocks In some cases, running the clocks faster can result in a lower average current consumption. For example, consider a PSoC™...
  • Page 17 PSoC™ 4 MCU low-power modes and power reduction techniques Other low-power mode considerations The time required for some tasks does not change even if the system clock frequency increases. Sensor reading and data transmitting fall into this category. Other tasks, however, require less time if the CPU operates at a faster frequency.
  • Page 18: Wdt

    PSoC™ 4 MCU low-power modes and power reduction techniques Other low-power mode considerations The WDT can operate in active, sleep, and deep sleep modes. The counters in the WDT can generate interrupts or resets, depending on the configuration and operating conditions. This allows the WDT to replace a traditional sleep timer in addition to guaranteeing reliable operation.
  • Page 19: Sar Adc

    PSoC™ 4 MCU low-power modes and power reduction techniques Other low-power mode considerations savings from reducing the TCPWM clock is mostly linear based on clock frequency. Figure 8 shows a comparison between the clock settings for the TCPWM block. Clk_TCPWM High-power HFCLK Clk_Peri...
  • Page 20: Debug Interface

    PSoC™ 4 MCU low-power modes and power reduction techniques Other low-power mode considerations Note: The hibernate regulator is not available in PSoC™ 4000, 4000S, 4100S, 4100S plus, 4100S Plus 256k, 4100S max, 4200DS, 4500S, 4700S, 4100PS, and analog coprocessor product lines. These devices do not support hibernate mode.
  • Page 21 PSoC™ 4 MCU low-power modes and power reduction techniques Other low-power mode considerations Figure 10 Change device mode to GPIO When the debug interface is disabled by setting these pins to GPIO mode, a reset must occur to access the debug controller inside the PSoC™...
  • Page 22: Code Examples

    PSoC™ 4 MCU low-power modes and power reduction techniques Code examples Code examples The following projects were designed to show the different aspects of low power modes in both ModusToolbox™ software and PSoC™ Creator. ModusToolbox™ software code examples The ModusToolbox™ software environment supports two projects: mtb-example-psoc4-power-modes mtb-example-psoc4-deep-sleep-adc.
  • Page 23 PSoC™ 4 MCU low-power modes and power reduction techniques Code examples Figure 11 Select the device selector option 3. Select the appropriate device from the pop-up menu that appears, as Figure 12 shows. Application Note 23 of 38 001-86233 Rev. *I 2021-11-04...
  • Page 24: Psoc™ 4 Mcu Code Examples

    PSoC™ 4 MCU low-power modes and power reduction techniques Code examples Figure 12 Device selector window PSoC™ 4 MCU code examples 7.3.1 Power modes code example ModusToolbox™ software: This code example is located on GitHub at mtb-example-psoc4-power-modes; you can easily compare all sleep and deep sleep modes with active mode. To change the power mode the device is in, press the on-board button longer than two seconds to put the device into Deep Sleep.
  • Page 25 PSoC™ 4 MCU low-power modes and power reduction techniques Code examples Figure 13 Switch power modes You can measure the current in PSoC™ 4 development kits; see the kit guide for more information. PSoC™ Creator: The project (AN86233_Power Modes) is available in the zip file associated with this application note.
  • Page 26: Project 2: Low Power Comp

    PSoC™ 4 MCU low-power modes and power reduction techniques Code examples 7.3.2 Project 2: Low power comp The PSoC™ Creator project (AN86233_LPComp) is available in the zip file associated with this application note. This project demonstrates how the low-power comparator (LPComp) can be used to wake the PSoC™ 4 MCU device from hibernate and return to active mode.
  • Page 27: Average Power

    PSoC™ 4 MCU low-power modes and power reduction techniques Code examples Reset Init HDWR Set up WDT0 for 1- second wakeup Trim ILO every 60th time through the loop. Ready to Trim trim ILO? Get ADC reading Convert to temp Send out UART Make sure data is totally sent before...
  • Page 28 PSoC™ 4 MCU low-power modes and power reduction techniques Code examples Figure 15 Measuring project active mode parameters If you average the power for both active and deep sleep modes, as shown in Table 4, it is easy to see that using the deep sleep low-power mode reduced the 5-mA current from active mode to an average of 6.7 µA, almost by three orders of magnitude! Table 4...
  • Page 29: Modustoolbox™ Hardware Configuration

    PSoC™ 4 MCU low-power modes and power reduction techniques ModusToolbox™ hardware configuration ModusToolbox™ hardware configuration For ModusToolbox™ hardware configuration see the code example readme. The ModusToolbox™ code example readmes shows how to set up and configure all hardware. Application Note 29 of 38 001-86233 Rev.
  • Page 30: Psoc™ Creator Hardware Configuration

    PSoC™ Creator hardware configuration PSoC™ Creator hardware configuration Infineon provides different development kits for the PSoC™ MCU families, including CY8CKIT-042 for PSoC™ 4200, CY8CKIT-044 for PSoC™ 4200M, and CY8CKIT-046 for PSoC™ 4200L MCUs. Also available are low-cost kits with a small form factor (prototyping kits), such as CY8CKIT-049 for PSoC™ 4200, CY8CKIT-043 for PSoC™ 4200M, and CY8CKIT-147 for PSoC™...
  • Page 31: Cy8Ckit-049-42Xx Kit (Psoc™ 4200)

    PSoC™ 4 MCU low-power modes and power reduction techniques PSoC™ Creator hardware configuration Figure 16 CY8CKIT-042 kit hardware CY8CKIT-044 and CY8CKIT-046 are similar to CY8CKIT-042 and have similar connections for the switch, LED, and UART Tx lines. See the kit guides provided on the respective web pages for more information on these kits. CY8CKIT-049-42xx kit (PSoC™...
  • Page 32: Cy8Ckit-043 Kit (Psoc™ 4200M)

    PSoC™ 4 MCU low-power modes and power reduction techniques PSoC™ Creator hardware configuration To measure the project current with the kit when the kit is powered from the USB port, remove the zero-ohm resistor R6, and add pins or wires in J4 that can be connected to an ammeter or digital multimeter (DMM). The USB-to-serial adapter provides a bootloader interface as well as a serial port adapter to display the output of the example project, AN86233_DeepSleepADC.
  • Page 33: Measuring Current With A Dmm

    PSoC™ 4 MCU low-power modes and power reduction techniques Measuring current with a DMM Measuring current with a DMM When using a DMM to measure the current, it is important to know the value of the shunt resistor in the DMM. DMMs have one or more (shunt) resistors between the current inputs.
  • Page 34: Reusing The Examples

    PSoC™ 4 MCU low-power modes and power reduction techniques Reusing the examples Reusing the examples The code examples mentioned in the earlier section can be ported to various PSoC™ 4 MCU devices, kits, or both. Before porting any code examples, note the following: 1.
  • Page 35: Summary

    PSoC™ 4 MCU low-power modes and power reduction techniques Summary Summary Power consumption can make the difference between a good idea and a successful design. By taking advantage of the many power-saving features available in PSoC™ 4 MCU, you can optimize your design and ensure that it consumes the lowest amount of power.
  • Page 36: Related Application Notes

    PSoC™ 4 MCU low-power modes and power reduction techniques Related application notes Related application notes These application notes give you more information relating to topics that are not fully discussed here: AN79953 – Getting started with PSoC™ 4 MCU AN85951 – PSoC™ 4 and PSoC™ 6 MCU CAPSENSE™ design guide AN86439 –...
  • Page 37: Revision History

    Added support for PSoC™ 4100PS throughout the document Updated power estimator spreadsheet and PSoC™ Creator projects 2021-11-04 Added support for ModusToolbox™ software and the peripheral driver library Updated to Infineon template Application Note 37 of 38 001-86233 Rev. *I 2021-11-04...
  • Page 38 Infineon Technologies hereby disclaims dangerous substances. For information on the types © 2021 Infineon Technologies AG. any and all warranties and liabilities of any kind in question please contact your nearest Infineon All Rights Reserved. (including without limitation warranties of non- Technologies office.

Table of Contents