XMC1404, current draw too high in DeepSleep mode

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User15596
Level 2
Level 2
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.

	

//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.
0 Likes
3 Replies
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
0 Likes
User15596
Level 2
Level 2
jferreira wrote:
Hi,

Please have a look at https://www.infineonforums.com/threads/6031-XMC1302-Low-Power-Modes?p=17595&viewfull=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?
0 Likes
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

Find below current measurements done in XMC1
1894.attach

Important is that the debugger is not connected since the Coresight debug logic will consume additional current.
Beside that you can enable the power save mode of the pins.
	PORTx->PPS = 0xFFFFU;


Regards,
Jesus
0 Likes