Hi,
I need to use LPC1114/302 in Deep Power-down mode in order to conserve battery power. However, the current consumption is still about 1.5mA when Deep Power-down mode is enabled. The following is one of my test programs:
[collapse title=Deep Power-down Mode Test Program]
#ifdef __USE_CMSIS
#include "LPC11xx.h"
#endif
#include <cr_section_macros.h>
#include <NXP/crp.h>
__CRP const unsigned int CRP_WORD = CRP_NO_CRP ;
int main(void)
{
LPC_SYSCON->PDSLEEPCFG = 0x18ff;
LPC_SYSCON->PDRUNCFG = 0xedf0;
LPC_SYSCON->PDAWAKECFG = LPC_SYSCON->PDRUNCFG;
LPC_PMU->PCON = 0x02;
SCB->SCR |= (1 << 2); // Set SLEEPDEEP bit
__WFI();
SCB->SCR &= ~(1 << 2); // reset SLEEPDEEP bit
for (;;) __NOP();
return 0 ;
}
[/collapse]
I have also changed system_LPC11xx.c to use IRC instead of crystal
[collapse]
#define SYSPLLCLKSEL_Val 0x00000000
#define SYSPLL_SETUP 0
#define SYSPLLCTRL_Val 0x00000000
#define MAINCLKSEL_Val 0x00000000
[/collapse]
During testing, the only connections to the MCU LPC1114/302 are the SWCLK, SWDIO, VDD and VSS pins. I have also tried setting all I/O pins to GPIO (except SWCLK and SWDIO) and output at low level. The result is still the same. Note that the program execution stops at __WFI(). Without the __WFI(), the current is much higher.
I have run similar program using LPCXpresso LPC11U14 board (LPC11U14/201), and the current is less than 100uA.
Can anyone tell me what can be the problem? My program or the MCU.
Thank you in advance.
-- Conrad
I did some more tests. It seems that MCU reset itself whenever it trys to enter deep sleep / deep power down mode. Furthermore, the MCU consumes about 1.x mA more than others running the same program under normal execution. It should be a defective chip.
Thank you for your reply.
I have tested using the sample code in AN11027 with the modifications to use IRC instead of crystal. The current is still about 1.5mA. I have tested another MCU in the same lot, the result is also the same.
On the other hand, I used my test program on the same MCU with different package (LPC1113FHN33/302 instead of LPC1113FBD48/302) and different date code, the current is only 0.0001mA.
The marking on the defective MCU is "LPC1114F/302 07.107 ZSD13 061B". Can you find out whether this problem apply to the whole lot or I am just unlucky :-(
Just to confirm it's not a software issue, can you try using the sample code in AN11027?
<a href="http://www.lpcware.com/content/nxpfile/an11027-using-lpc1100-low-power-modes-and-wake-times-lpcxpres...">http://www.lpcware.com/content/nxpfile/an11027-using-lpc1100-low-power-modes-and-wake-times-lpcxpres...</a>
If that code still gives you a high current draw, you may have a defective chip.