infineon4engineers Facebook

infineon@google+ Google+

infineon@linkedin linkedin

infineon4engi@twitter twitter

infineon@youtube youtube

+ Reply to Thread
Results 1 to 3 of 3

Thread: XMC1404, current draw too high in DeepSleep mode

  1. #1
    Beginner Beginner S R is on a distinguished road
    Join Date
    Aug 2018
    Posts
    12
    Points
    77.5

    XMC1404, current draw too high in DeepSleep mode

    XMC1404, using the code below. The lowest we've been able to get is 750uA with chip alone. Turned all IOs to inputs where we could, used another post here to get started. Having trouble figuring out what the chip could be using 500+uA extra over what the datasheet says we can expect. 5V VDD. Using only math, and CAN peripherals during normal use.

    Code:
    	
    	
    	//Set all pins to inputs
    	XMC_GPIO_SetMode(XTAL1_PIN.gpio_port, XTAL1_PIN.gpio_pin, XMC_GPIO_MODE_INPUT_TRISTATE);
    	XMC_GPIO_SetInputHysteresis(XTAL1_PIN.gpio_port, XTAL1_PIN.gpio_pin, XMC_GPIO_INPUT_HYSTERESIS_STANDARD);
    
    	XMC_GPIO_SetMode(XTAL2_PIN.gpio_port, XTAL2_PIN.gpio_pin, XMC_GPIO_MODE_INPUT_TRISTATE);
    	XMC_GPIO_SetInputHysteresis(XTAL2_PIN.gpio_port, XTAL2_PIN.gpio_pin, XMC_GPIO_INPUT_HYSTERESIS_STANDARD);
    
    	XMC_GPIO_SetMode(BOOT0_PIN.gpio_port, BOOT0_PIN.gpio_pin, XMC_GPIO_MODE_INPUT_TRISTATE);
    	XMC_GPIO_SetInputHysteresis(BOOT0_PIN.gpio_port, BOOT0_PIN.gpio_pin, XMC_GPIO_INPUT_HYSTERESIS_STANDARD);
    
    	XMC_GPIO_SetMode(UNUSED_PIN_0.gpio_port, UNUSED_PIN_0.gpio_pin, XMC_GPIO_MODE_INPUT_TRISTATE);
    	XMC_GPIO_SetInputHysteresis(UNUSED_PIN_0.gpio_port, UNUSED_PIN_0.gpio_pin, XMC_GPIO_INPUT_HYSTERESIS_STANDARD);
    
    	XMC_GPIO_SetMode(UNUSED_PIN_1.gpio_port, UNUSED_PIN_1.gpio_pin, XMC_GPIO_MODE_INPUT_TRISTATE);
    	XMC_GPIO_SetInputHysteresis(UNUSED_PIN_1.gpio_port, UNUSED_PIN_1.gpio_pin, XMC_GPIO_INPUT_HYSTERESIS_STANDARD);
    
            ... not all shown
    
    	XMC_GPIO_SetMode(UNUSED_PIN_21.gpio_port, UNUSED_PIN_21.gpio_pin, XMC_GPIO_MODE_INPUT_TRISTATE);
    	XMC_GPIO_SetInputHysteresis(UNUSED_PIN_21.gpio_port, UNUSED_PIN_21.gpio_pin, XMC_GPIO_INPUT_HYSTERESIS_STANDARD);
    	
    
    	
    	
    	//Put pins in power save mode
    	XMC_GPIO_EnablePowerSaveMode(LED_PIN.gpio_port, LED_PIN.gpio_pin);
    	XMC_GPIO_EnablePowerSaveMode(XTAL1_PIN.gpio_port, XTAL1_PIN.gpio_pin);
    	XMC_GPIO_EnablePowerSaveMode(XTAL2_PIN.gpio_port, XTAL2_PIN.gpio_pin);
    	XMC_GPIO_EnablePowerSaveMode(BOOT0_PIN.gpio_port, BOOT0_PIN.gpio_pin);
    	XMC_GPIO_EnablePowerSaveMode(BOOT1_PIN.gpio_port, BOOT1_PIN.gpio_pin);
    	XMC_GPIO_EnablePowerSaveMode(UNUSED_PIN_0.gpio_port, UNUSED_PIN_0.gpio_pin);
    
            ... Not all shown
    
    	XMC_GPIO_EnablePowerSaveMode(UNUSED_PIN_21.gpio_port, UNUSED_PIN_21.gpio_pin);
    
    							
    	
    	//Turn off systick to prevent interrupts
    	SysTick->CTRL  = SysTick_CTRL_CLKSOURCE_Msk | SysTick_CTRL_ENABLE_Msk;
    	
    
            // The clock of the peripherals that are not needed during sleep state can be gated before entering sleep state
            XMC_SCU_CLOCK_GatePeripheralClock(XMC_SCU_PERIPHERAL_CLOCK_MATH);
    	XMC_SCU_CLOCK_GatePeripheralClock(XMC_SCU_PERIPHERAL_CLOCK_MCAN);
    	
           // Enable FLASH power down during SLEEP and DEEPSLEEP mode
           XMC_SCU_CLOCK_EnableFlashPowerDown();
    	
           // Make sure that SLEEPDEEP bit is set
           SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
    
          // Return to SLEEP mode after handling the wakeup event
    	SCB->SCR |= SCB_SCR_SLEEPONEXIT_Msk;
    
          // in deep-sleep state, the PCLK and MCLK will
          // be switched to a slow standby clock and DCO1 will be put into power-down mode
          // It is recommended to slow down the PCLK and MCLK before entering deep sleep
          // mode to prevent a sudden load change that could cause a brownout reset.
          XMC_SCU_CLOCK_SetFastPeripheralClockSource(XMC_SCU_CLOCK_PCLKSRC_MCLK);
          XMC_SCU_CLOCK_SetMCLKFrequency(125);
    
          // Put system in DEEPSLEEP state
          __WFI();
    
    }
    Looking for things to try. This chip can't have a low potential of 750uA, that's way too high.

  2. #2

    Infineon Employee
    Infineon Employee
    jferreira will become famous soon enough
    Join Date
    Oct 2012
    Posts
    441
    Hi,

    Please have a look at https://www.infineonforums.com/threa...ll=1#post17595

    Regards,
    Jesus
    The views expressed here are my personal opinions, have not been reviewed or authorized by Infineon and do not necessarily represent the views of Infineon.

  3. #3
    Beginner Beginner S R is on a distinguished road
    Join Date
    Aug 2018
    Posts
    12
    Points
    77.5
    Quote Originally Posted by jferreira View Post
    Hi,

    Please have a look at https://www.infineonforums.com/threa...ll=1#post17595

    Regards,
    Jesus
    Jesus,

    Yea, we not only saw that but kept the same comments. From what I can see we're doing the same thing. Still far too high consumption.

    Can you see anything else we might try, doing wrong, missed?

+ Reply to Thread
Disclaimer

All content and materials on this site are provided “as is“. Infineon makes no warranties or representations with regard to this content and these materials of any kind, whether express or implied, including without limitation, warranties or representations of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. No license, whether express or implied, is granted by Infineon. Use of the information on this site may require a license from a third party, or a license from Infineon.


Infineon accepts no liability for the content and materials on this site being accurate, complete or up- to-date or for the contents of external links. Infineon distances itself expressly from the contents of the linked pages, over the structure of which Infineon has no control.


Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Usage Terms of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Usage Terms of this site. Infineon reserves the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.