LPC845: can't go below 25µA in power down mode

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LPC845: can't go below 25µA in power down mode

2,382 Views
v_canoz
Contributor III

Hello,

I'm trying to reach the current stated in the datasheet of the LPC845 in power down mode.pastedImage_2.png

I'm working at Tamb = 25°C, Vdd = 3.3V, QFN33 package.

This is the code I run :

#include "fsl_debug_console.h"
#include "board.h"
#include "fsl_common.h"
#include "fsl_power.h"
#include "fsl_usart.h"
#include "fsl_syscon.h"
#include "fsl_wkt.h"
#include "fsl_iocon.h"
#include "pin_mux.h"
#include <stdbool.h>
#include "fsl_pint.h"
#include "fsl_swm.h"


/*
* Setup a GPIO input pin as wakeup source.
*/

void DEMO_PreEnterLowPower(void)
{
/* switch main clock source to FRO18M */
POWER_DisablePD(kPDRUNCFG_PD_FRO_OUT);
POWER_DisablePD(kPDRUNCFG_PD_FRO);
CLOCK_SetMainClkSrc(kCLOCK_MainClkSrcFro);
CLOCK_SetFroOscFreq(kCLOCK_FroOscOut18M);
CLOCK_SetFroOutClkSrc(kCLOCK_FroSrcFroOsc);

/* system osc power down
* application should decide if more part need to power down to achieve better power consumption
* */
POWER_EnablePD(kPDRUNCFG_PD_SYSOSC);
CLOCK_DisableClock(kCLOCK_Iocon);
CLOCK_DisableClock(kCLOCK_Uart0);
}


/*!
* @brief Main function
*/
int main(void)
{
BOARD_BootClockPll24M();

GPIO_PortInit(GPIO, 0);
CLOCK_EnableClock(kCLOCK_Iocon);

/* disable all pull ups */
for (int i =0; i< 52; i++)
{
if (i == 12) continue; //reserved
if (i == 19) continue; //reserved
if (i > 30 && i <35) continue; //reserved
if (i > 35 && i <50) continue; //reserved
IOCON->PIO[i] &= ~(IOCON_PIO_MODE_MASK);
IOCON->PIO[i] &= ~(IOCON_PIO_HYS_MASK);
}

CLOCK_DisableClock(kCLOCK_Iocon);

for (int i =0; i< 28; i++)
{
if (i == 24)// || i == 6)
{
//UART RX pin set to input
GPIO_PinInit(GPIO, 0, i, &(gpio_pin_config_t){kGPIO_DigitalInput, 0});
continue;
}
if (i == 6)
{
//S2LP shutdown must be set
GPIO_PinInit(GPIO, 0, i, &(gpio_pin_config_t){kGPIO_DigitalOutput, 1});
continue;
}
GPIO_PinInit(GPIO, 0, i, &(gpio_pin_config_t){kGPIO_DigitalOutput, 0});
}

DEMO_PreEnterLowPower();

/* disable SWD */
CLOCK_EnableClock(kCLOCK_Swm);
SWM0->PINENABLE0 = 0xFFFFFDFF; //demap everything except reset
SWM0->PINENABLE1 = 0x7F;
CLOCK_DisableClock(kCLOCK_Swm);
CLOCK_DisableClock(kCLOCK_Gpio0);


POWER_EnterPowerDown(0);

return 1;
}

  1. I've disabled all the pull ups.
  2. All the pins are set to output at low level, except 1 gpio as input (level is maintained high by an external device which current does not contribute to my measurement)  and 1 gpio as output to 1 (load current < 50nA). I suppose this high level could add a few µA, but currently the power consumption is way too high : about 25µA after detaching the debugger.
  3. BOD and WDT are disabled
  4. I need only a wake up on reset pin (by the way, does the reset wake-up the chip, or does it simply reset it as usual?)

What am I missing?

Labels (1)
Tags (1)
13 Replies

895 Views
phatpaul
Contributor III

FYI for the community:

We spent a lot of time trying to achieve the 1.5uA consumption in Power-Down mode on LPC845M301JHI33, but we couldn't get it lower than ~6uA.  We finally got confirmation from NXP that the LPC845 in 33-pin package draws more current than the higher-pin-count parts. 

NXP's response was:

33pin package power down mode typical power consumption is higher than 48pin, which is normal but currently they don't have data in DS

The suggestion from application team is " using the 48pin package to replace the 33pin package".

Hope this note saves some headache and wasted time for someone else...

0 Kudos

2,186 Views
phidiawang
Contributor III
  • I have solved this problem, please see the attachment

  • pastedImage_1.png
  • pastedImage_1.png
  • pastedImage_2.png
  • pastedImage_3.png
0 Kudos

2,186 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi wang qifei

I got time to test your power_mode_switch_lpc.c today -- replace the same file with it under SDK2.8  power_mode_switch_lpc demo . but the result is not as yours, Could you please upload your project here?

Thanks

Jun Zhang

0 Kudos

2,185 Views
phidiawang
Contributor III

I tested  it again(LPCXpresso845MAX),it's 1.17uA.

pastedImage_1.png

I disconnected the SJ6,and concatenated the multimeter between 2 pins of  JP2.

pastedImage_2.png

0 Kudos

2,185 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

I tested it again. 

I think the key issue of getting 43.6uA in power down mode is that IDE is interactive with LPC845 via SWD background, LPC845 debug module was not fully power down. I just tested below code on demo code (very simple):

pastedImage_1.png

after downloading code, disconnected power supply, then powered on board again. the current went down to 1.5uA:

pastedImage_2.png

Jun Zhang

0 Kudos

2,185 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Good to know.

Thanks for the sharing,

Jun Zhang

0 Kudos

2,185 Views
v_canoz
Contributor III

Hello Jun,

The code above is extracted from the example you've mentioned. Actually the power consumption is about the same with the example.

By the way, the mode 4 (deep power down) does not work on my side, current does not go below 2mA in this mode (but this is not the problem here)

In the code I posted above, is there something missing, did I forget to disable something ?

Thanks,

0 Kudos

2,185 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

 I checked sample code power down mode, temperature is around 26C. it's 43.6 uA. It's normal. please check the same.

pastedImage_1.png

0 Kudos

2,185 Views
v_canoz
Contributor III

Hello,

Ok, but what modifications do I have to do in the code, in order to be able to reach the current stated in page 48 of the datasheet ?

Power-down mode states 1.5µA typ current at 25°C...

pastedImage_2.png

Thank you,

Victor

0 Kudos

2,185 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Victor,

in order to get the datasheet value, you need 

- IDD measurements were performed with ALL pins configured as GPIO outputs driven LOW and pull-up resistors disabled.

- ALL oscillators and analog blocks turned off.

the SDK demo should not do all above initialization. 

BTW, I test deep power down mode with SDK demo. the Id is 1.4uA

pastedImage_1.png


Have a great day,
Jun Zhang

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos

2,185 Views
v_canoz
Contributor III

Hello Jun,

Can you provide the project used for reaching this current ?

I honestly don't know what I forget to disable...

Thanks !

0 Kudos

2,185 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Sorry, I don't have the testing project for datasheet data.

User needs to follow this to implement by self.

Thanks,

Jun Zhang

0 Kudos

2,185 Views
ZhangJennie
NXP TechSupport
NXP TechSupport

Hi

I suggest test your board with MCUXpresso SDK demo

SDK_LPCXpresso845MAX\boards\lpcxpresso845max\demo_apps\power_mode_switch_lpc\

This demo has 4 options:
1. Sleep mode

2. Deep Sleep mode

3. Power Down mode

4. Deep power down mode

select power download mode, test if the current is as your expected.

Have a nice day,

Jun Zhang

0 Kudos