Infineon XMC7000 Series Manual
Hide thumbs Also See for XMC7000 Series:

Advertisement

Quick Links

AN234021
Low-power mode procedure in XMC7000 family

About this document

Scope and purpose
This application note describes the features of low-power modes in XMC7000 family MCUs from Infineon and
explains how to enter low-power modes and return to active mode.
Intended audience
This document is intended for anyone who uses the low-power mode features in XMC7000 MCUs.
Associated part family
XMC7000
family of
XMC™ industrial
microcontrollers.
Application note
Please read the Important Notice and Warnings at the end of this document
002-34021 Rev. *B
www.infineon.com
2024-07-04

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the XMC7000 Series and is the answer not in the manual?

Questions and answers

Summary of Contents for Infineon XMC7000 Series

  • Page 1: About This Document

    Low-power mode procedure in XMC7000 family About this document Scope and purpose This application note describes the features of low-power modes in XMC7000 family MCUs from Infineon and explains how to enter low-power modes and return to active mode. Intended audience This document is intended for anyone who uses the low-power mode features in XMC7000 MCUs.
  • Page 2: Table Of Contents

    Low-power mode procedure in XMC7000 family Table of contents Table of contents About this document ........................1 Table of contents ..........................2 Introduction .......................... 3 Power modes of XMC7000 family ....................4 Power modes transition ......................6 Entering power modes ..........................6 3.1.1 RESET/OFF state..........................
  • Page 3: Introduction

    Introduction Introduction This application note describes low-power modes in Infineon’s XMC7000 family MCUs. The series includes Arm® Cortex® CPUs, CAN FD, memory, and analog and digital peripheral functions in a single chip, and the series has one or two Arm® Cortex®-M7-based CPUs (CM7) and CM0+.
  • Page 4: Power Modes Of Xmc7000 Family

    Low-power mode procedure in XMC7000 family Power modes of XMC7000 family Power modes of XMC7000 family XMC7000 family MCUs have the following power modes: Active mode: All peripherals are available. • Sleep mode: All peripherals except the CPU are available. •...
  • Page 5 Low-power mode procedure in XMC7000 family Power modes of XMC7000 family Power mode Description Entry condition Wakeup source Wakeup action Sleep CPU is in Sleep mode; all other Register write Any interrupt to Interrupt peripherals are available. from active mode or wakeup from DeepSleep through...
  • Page 6: Power Modes Transition

    Low-power mode procedure in XMC7000 family Power modes transition Power modes transition This section describes how to use the low-power mode procedure using the Peripheral Driver Library (PDL). Entering power modes Figure 2 shows various states that the device can be in along with possible power mode transition paths. The transitions are described in detail later in this application note.
  • Page 7: Entering Low-Power Mode

    Low-power mode procedure in XMC7000 family Power modes transition 3.1.2 Entering low-power mode Table 2 shows how to enter low-power mode and the actions in low-power modes. Table 2 Low-power mode transitions Initial state Final state Trigger Hardware actions Active Sleep Firmware action 1.
  • Page 8 Low-power mode procedure in XMC7000 family Power modes transition Initial state Final state Trigger Hardware actions Active DeepSleep Firmware action 1. CPU enters a low- power mode. Perform these steps to enter DeepSleep mode (LPM_READY bit [5] of the PWR_CTL register 2.
  • Page 9 Low-power mode procedure in XMC7000 family Power modes transition Initial state Final state Trigger Hardware actions Active Hibernate Firmware action 1. CPU enters a low- power mode. 1. Set TOKEN bits [7:0] of the PWR_HIBERNATE register (optional) and PWR_HIB_DATA 2. Both high- register to some application-specific frequency and low- branching data that can be used on a...
  • Page 10 Low-power mode procedure in XMC7000 family Power modes transition Initial state Final state Trigger Hardware actions Sleep DeepSleep When the debugger is not connected and 1. High-frequency DeepSleep mode is triggered, but clocks are shut LPM_READY==0, the device internally enters down.
  • Page 11 Low-power mode procedure in XMC7000 family Power modes transition Figure 3 shows the software and hardware operation for the transition from Active mode to DeepSleep mode. Software Operation Follo win g settin gs are necessary before enterin g Deep Sleep mode : ・Ope ration Clo ck setting Start (A ctive)* *If a ny FLL/PLL is used as operation clock with the ECO...
  • Page 12 Low-power mode procedure in XMC7000 family Power modes transition Figure 4 shows the software and hardware operation for the transition from Active mode to Hibernate mode. Software operation Start (A ctive) Hardware operation Set PWR_HIB ERNATE:FRE EZE=1 Disa ble Override s CPU en ter s th e Hiberna te mode by p erforming thr ee identical writes to the Write P WR_HIBERNATE: PWR_HIB ERNATE regi ster.
  • Page 13: Wakeup From Low-Power Modes

    Low-power mode procedure in XMC7000 family Power modes transition 3.1.3 Wakeup from low-power modes Table 3 shows the hardware triggers for wakeup and the actions after wakeup. Table 3 Wakeup action Initial state Final state Trigger source Hardware action Sleep Active Any enabled interrupt CPU exits Sleep mode and execute the...
  • Page 14 Low-power mode procedure in XMC7000 family Power modes transition Figure 5 shows the software and hardware operation for the transition from DeepSleep mode to Active mode. Software operation Start (DeepS leep) Hardware operation Interrupt Turn ON A ctive Referen ce and Core Regulator (if used) .
  • Page 15: Wdt Setting During Low-Power Modes

    Low-power mode procedure in XMC7000 family Power modes transition WDT setting during low-power modes The watchdog timer (WDT) in XMC7000 automatically resets the device in the event of an unexpected software execution path. In addition, the WDT can be used as an interrupt source or a wakeup source in Low-power modes.
  • Page 16: Example Of Wdt Wakeup Operation

    Low-power mode procedure in XMC7000 family Power modes transition 3.2.2 Example of WDT wakeup operation Figure 6 shows an example of the operation with Subcounter 0/1 of MCWDT. In this example, Subcounter0 of MCWDT is used as a supervisor of an unexpected software execution path, and Subcounter1 of MCWDT is used as a periodic wakeup interrupt generator during Low-power mode.
  • Page 17: Configuration And Example Code

    Low-power mode procedure in XMC7000 family Power modes transition Subcounter 1 continues counting upwards during Low-power mode. If the counter value reaches the setting value of “WARN_LIMIT”, MCU wakes up from Low-power mode. If the AUTO_SERVICE setting is used, the hardware resets the counter value.
  • Page 18 Low-power mode procedure in XMC7000 family Power modes transition Parameters Description Value .c0SleepDeepPau Enables to pause Subcounter 0 CY_MCWDT_DISABLE when the corresponding CPU is in DeepSleep .c0DebugRun Sets the debugger configuration. It CY_MCWDT_ENABLE needs when using debugger Sets Subcounter 1 lower limit .c1LowerLimit (unsigned integer 32-bit) .c1UpperLimit...
  • Page 19 Low-power mode procedure in XMC7000 family Power modes transition Functions Description Cy_MCWDT_Unlock() Unlocks the MCWDT configuration registers. Cy_MCWDT_SetInterruptMask() Writes MCWDT interrupt mask register. Cy_MCWDT_Enable() Enables all specified counters. Cy_MCWDT_Lock() Locks out configuration changes to all MCWDT registers. Cy_MCWDT_ClearWatchdog() Clears the MC watchdog counter, to prevent a XRES device reset or fault.
  • Page 20 Low-power mode procedure in XMC7000 family Power modes transition Code Listing 1 Example to WDT wakeup operation in power mode transition tFlag = 1u; int main(void) /* Setup the MCWDT interrupt */ Assign MCWDT interrupt Cy_SysInt_Init(&mcwdtIrqConfig, &irqMCWDT1Handler); NVIC_EnableIRQ(NvicMux2_IRQn); Cy_MCWDT_DeInit(MCWDT1); Cy_MCWDT_Init(MCWDT1, &mcwdtConfig); Cy_MCWDT_Unlock(MCWDT1);...
  • Page 21: Cyclic Wakeup Operation

    Low-power mode procedure in XMC7000 family Power modes transition Cyclic wakeup operation Cyclic Wakeup Operation is an intermittent MCU operation. For example, when the Electronic Control Unit (ECU) is in Sleep mode, the MCU cyclically enters DeepSleep mode and wakes up. This operation is intended to minimize the average power consumption in an application.
  • Page 22: Cyclic Wakeup Operation

    Low-power mode procedure in XMC7000 family Power modes transition 3.3.2 Cyclic wakeup operation Figure 9 shows the concept of the cyclic wakeup operation. XMC7000 device cyclically wakes up to check the external sensor information when the ECU enters Sleep mode. Power supply current Active...
  • Page 23: Flowchart Of Cyclic Wakeup Operation

    Low-power mode procedure in XMC7000 family Power modes transition 3.3.3 Flowchart of cyclic wakeup operation Software operation Start Hardware operation ADC configuration - Group configuration - Trigger selection (EVTGEN) - Sampling time per channel - Range detect mode per channel EVTGEN(32kHz) configuration - Wakeup time (COMP1) - ADC trigger timing (COMP0)
  • Page 24: Configuration And Example Code

    Low-power mode procedure in XMC7000 family Power modes transition − If flags are not set, the CPU transfers to DeepSleep mode again after restarting timers of Comp0 and Comp1. 3.3.3.1 Configuration and example code Figure 11 EVTGEN counter configuration in Device Configurator Figure 12 Figure 13 EVTGEN comparator configuration in Device Configurator...
  • Page 25 Low-power mode procedure in XMC7000 family Power modes transition Figure 15 SAR channel configuration in Device Configurator Table 7 lists the parameters and Table 8 lists the functions of the configuration part for cyclic wakeup operation. Table 7 List of cyclic wakeup operation configuration parameters Parameters Description Value...
  • Page 26 Low-power mode procedure in XMC7000 family Power modes transition Table 8 List of cyclic wakeup operation configuration functions Functions Description Remarks adc_int_handler() Interrupt handler for ADC Code Listing 2 evtgen_isr() Interrupt handler for event generator Code Listing 2 evtgen_deepsleep_isr() Interrupt handler for event generator in deep Code Listing 2 sleep Clears the DeepSleep interrupt factor of the...
  • Page 27 Low-power mode procedure in XMC7000 family Power modes transition Code Listing 2 Example of cyclic wakeup operation .enableIdlePowerDown = true, .msbStretchMode = CY_SAR2_MSB_STRETCH_MODE_1CYCLE, .enableHalfLsbConv = false, .sarMuxEnable = true, .adcEnable = true, .sarIpEnable = true, .channelConfig = {(cy_stc_sar2_channel_config_t *)&ADC_channel_0_config, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, void adc_int_handler (void) uint32_t adc_status = 0;...
  • Page 28: Usage Of Smart I/O In Cyclic Wakeup

    Low-power mode procedure in XMC7000 family Power modes transition Code Listing 2 Example of cyclic wakeup operation NVIC_EnableIRQ((IRQn_Type)EVTGEN_IRQ_NUM); /* Initialize event generator */ Cy_EvtGen_Init(EVTGEN_HW, &EVTGEN_config); /* Start event generator */ Cy_EvtGen_Enable(EVTGEN_HW); /* Delay a bit and wait for the counter completed initialization */ Cy_SysLib_DelayUs(625);...
  • Page 29: Advantage Of Smart I/O Implementation In Cyclic Wakeup

    Low-power mode procedure in XMC7000 family Power modes transition consumption, but this approach may make the program more complex. Additionally, you should consider the transition time between different power modes. Figure 16 shows the system configuration of this use case. GPIO is activated by Smart I/O, instead of CPU as demonstrated in Figure XMC7000...
  • Page 30: Smart I/O Configuration In Cyclic Wakeup

    Low-power mode procedure in XMC7000 family Power modes transition Power supply current Cyclic Wakeup period DeepSleep time LPACTIVE time Lowpower Lowpower Active Active Time DeepSleep Convert Convert Converter Config Config Smart I/O uration uration CPU turns GPIOs off after ADC Sensors GPIO Signal conversion is done...
  • Page 31 Low-power mode procedure in XMC7000 family Power modes transition Delay = 4 x DAT LUT[3] output sensor_io (acts as 11 bit) LUT[1] output (acts as 10 bit) LUT[0] output (acts as 9 bit) Data Unit tr_out Data Unit Reset counter Bit[7:0] Start/Reloa d sensor_io_clr (from HSIOM)
  • Page 32 Low-power mode procedure in XMC7000 family Power modes transition constant 0 Smart I/O, Internal Logic Smart I/O, internal logic Clock & Clock & DATA.DATA clk_fabric clk_block Reset reset clk_smartio Data unit Data Unit clk_fabric clk_block clk_sys clk_lf Sync Sync io_data_in[7] smartio_data[7] smartio_data[7] chip_data[7]...
  • Page 33 Low-power mode procedure in XMC7000 family Power modes transition Tr0_in Tr1_in Tr2_in Tr_out DU tr_out LUT[0] out LUT[1] out Table 11 Look up table LUT [2] Tr0_in Tr1_in Tr2_in Tr_out DU tr_out LUT[0] out LUT[1] out Table 12 Look up table LUT [3] Tr0_in Tr1_in Tr2_in...
  • Page 34: Sensor Activation Circuitry In Cyclic Wakeup Operation

    Low-power mode procedure in XMC7000 family Power modes transition ���������� = �� − �� ������������ ������������ ������������ ������������ �������������������������� �������� Equation 3 ∴ ������1 = 8 × (�� − �� ������������ ������������ ������������ ������������ �������������������������� �������� Equation 4 For example, if �� = 32 [ms], you can configure DAT0 = 0, DAT1 = 0xFD to make ������������...
  • Page 35 Low-power mode procedure in XMC7000 family Power modes transition Sensor Activation Circuitry in Cyclic Wakeup Legend: Start Software operation Hardware operation Enter DeepSl eep mo de GPIO Activation by S ma rt I/O Interrupt EVTGE N = Wakeup ti me (Comp1)? SW wa its u nti l sensor_io is sensor_io == 0...
  • Page 36: Configuration And Example Code

    Low-power mode procedure in XMC7000 family Power modes transition 3.3.4.4 Configuration and example code Figure 22 SAR block configuration in Device Configurator Figure 23 EVTGEN block configuration in Device Configurator Application note 002-34021 Rev. *B 2024-07-04...
  • Page 37 Low-power mode procedure in XMC7000 family Power modes transition Figure 24 Smart I/O block configuration in Device Configurator Application note 002-34021 Rev. *B 2024-07-04...
  • Page 38 Low-power mode procedure in XMC7000 family Power modes transition Table 13 lists the parameters and Table 14 lists the functions of the configuration part for Smart I/O in cyclic wakeup. Table 13 List of Smart I/O in cyclic wakeup configuration parameters Parameters Description Value...
  • Page 39 Low-power mode procedure in XMC7000 family Power modes transition Parameters Description Value lutCfgLut3.opcode Configures LUT[3] operation CY_SMARTIO_LUTOPC_GATED_OUT mode setting lutCfgLut3.lutMap Configures LUT[3] output 0x54ul pattern setting Configures LUT[3] tr0 input lutCfgLut3.tr0 CY_SMARTIO_LUTTR_CHIP3 lutCfgLut3.tr1 Configures LUT[3] tr1 input CY_SMARTIO_LUTTR_LUT3_OUT lutCfgLut3.tr2 Configures LUT[3] tr2 input CY_SMARTIO_LUTTR_LUT2_OUT lutCfgDu.tr0 Configures DU input trigger 0...
  • Page 40 Low-power mode procedure in XMC7000 family Power modes transition Code Listing 3 Example of usage of Smart I/O in cyclic wakeup operation /* Initialize and start Event generator */ Cy_EvtGen_DeinitCompStruct(EVTGEN0, EVTGEN_COMP_STRUCT_NO); Cy_EvtGen_DeInit(EVTGEN0); Cy_EvtGen_Init(EVTGEN0,&evtgenConfig); /* Initialize comparator structure */ Cy_EvtGen_InitCompStruct(EVTGEN0, EVTGEN_COMP_STRUCT_NO, &evtgenStructureConfig); Smart I/O module initialization.
  • Page 41 Low-power mode procedure in XMC7000 family Power modes transition Code Listing 5 Init_SmartIO() function void Init_SmartIO(void) Smart I/O module initialization /* Configure smart io to output H in deepsleep * Using data unit and LUT0,1,2,3 to create a 11bit counter * Data uint acts as lower 8 bit, count up from 0 to value written in DATA, reset to 0 at overflow * LUT0 acts as 9th bit, LUT1 acts as 10th bit and LUT 3 act as 11th bit * output of LUT3 is smart io output, i.e.
  • Page 42: Can Wakeup Operation

    Low-power mode procedure in XMC7000 family Power modes transition CAN wakeup operation As long as there is any communication on the CAN bus, the ECU is awake. If CAN communication occurs while the ECU is in low-power mode, the ECU must wake up from low-power mode. This section describes an implementation example of the CAN Wakeup operation by using XMC7000 family MCUs.
  • Page 43: Configuration And Example Code

    Low-power mode procedure in XMC7000 family Power modes transition 3.4.1 Configuration and example code Figure 26 CAN configuration in Device Configurator Application note 002-34021 Rev. *B 2024-07-04...
  • Page 44 Low-power mode procedure in XMC7000 family Power modes transition Table 15 lists the functions of the configuration part for CAN wakeup operation. In this example, the GPIO and CAN RX pins are common. Table 15 List of CAN wakeup operation configuration functions Functions Description GpioIntHandler()
  • Page 45 Low-power mode procedure in XMC7000 family Power modes transition Code Listing 6 Example to CAN wakeup operation .hsiom = HSIOM_SEL_GPIO, .intEdge = CY_GPIO_INTR_FALLING, .intMask = 1UL, .vtrip = CY_GPIO_VTRIP_CMOS, .slewRate = CY_GPIO_SLEW_FAST, .driveSel = CY_GPIO_DRIVE_1_2, .vregEn = 0UL, .ibufMode = 0UL, .vtripSel = 0UL, .vrefSel = 0UL, .vohSel = 0UL,...
  • Page 46 Low-power mode procedure in XMC7000 family Power modes transition Code Listing 6 Example to CAN wakeup operation for(;;) /* Stop CAN */ /* CAN Clock stop request */ if(CY_CANFD_SUCCESS != Cy_CANFD_Disable(CANFD_HW, CAN_HW_CHANNEL)) CY_ASSERT(0); /* Change CAN Rx Port to GPIO */ Cy_GPIO_Pin_Init(CYBSP_CAN_RX_PORT, CYBSP_CAN_RX_PIN, &CYBSP_CAN_RX_GPIO_config);...
  • Page 47 Low-power mode procedure in XMC7000 family Power modes transition Code Listing 8 Canfd_rx_callback() function /* Message was received in Rx FIFO */ if (rxFIFOMsg == true) /* Checking whether the frame received is a data frame */ if(CY_CANFD_RTR_DATA_FRAME == basemsg->r0_f->rtr) /* Toggle the user LED */ Cy_GPIO_Inv(CYBSP_USER_LED_PORT, CYBSP_USER_LED_PIN);...
  • Page 48: Glossary

    Low-power mode procedure in XMC7000 family Glossary Glossary Table 16 Glossary Terms Description Analog-to-digital converter. See the “SAR ADC” chapter of the architecture reference manual for details. Basic WDT Basic Watchdog Timer. See the “Watchdog Timer” chapter of the architecture reference manual for details.
  • Page 49 Low-power mode procedure in XMC7000 family Glossary Terms Description Serial Communications Block. See the “Serial Communications Block (SCB)” chapter of architecture reference manual for details. SRSS System Resources Subsystem. See the “System Resources Subsystem” section of the architecture reference manual for details.
  • Page 50: References

    Low-power mode procedure in XMC7000 family References References Contact Technical Support to obtain XMC7000 family reference documents. [1] Device datasheet − XMC7100 series 32-bit Arm® Cortex®-M7 microcontroller datasheet − XMC7200 series 32-bit Arm® Cortex®-M7 microcontroller datasheet [2] Device reference manuals −...
  • Page 51: Revision History

    Low-power mode procedure in XMC7000 family Revision history Revision history Document Date Description of changes revision 2021-12-21 Initial release 2022-05-25 Updated the configuration and example code in the following: 3.2.2.1 • 3.3.3.1 • 3.3.4.4 • 2024-07-04 Updated documents in References section Updated examples Device Configurator Updated examples code Application note...
  • Page 52: Disclaimer

    Infineon Technologies hereby Infineon Technologies’ products may not be used in disclaims any and all warranties and liabilities of any applications where a failure of the product or any any kind (including without limitation warranties of © 2024 Infineon Technologies AG.

Table of Contents