power down

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

power down

254 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Frankb on Tue Dec 04 06:31:03 MST 2012
Hello,

I have a LPC11U14, which I want to power down as much as possible using a push button. I have tried, but failed miserable so far... I was wondering if there is an example somewhere which can help me.

So far I have connected the push button to a GPIO pin interrupt. In this interrupt I wrote the following code:

LPC_PMU->PCON = (1UL<<1);
SCB->SCR = (1UL<<2);


Unfortunately I don´t see the power consumption going down at all when I push the button. I do see that the button indeed triggers the interrupt, so that is not the problem.

Any tips? Unfortunately I do not have the opportunity to pull the WAKEUP pin high, so I guess that deep power down is out of the question.

EDIT: I have added the line

__WFI();


to my code and now it goes into power down mode. Also I have made sure that all the registers are reset to their reset values before going into power down mode. I see that now that Idd = 1.1 mA. Is it possible to get this down further? Into the uA range?
0 Kudos
3 Replies

229 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Frankb on Fri Dec 07 02:58:32 MST 2012
Ok I found the problem. The wake up code didn´t work properly because I called the power down inside an interrupt. When I instead made an variable that switches in the interrupt and then move the power down code into an if loop in the main loop the waking up worked fine.
0 Kudos

229 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Frankb on Thu Dec 06 05:56:35 MST 2012
Great, thanks! I have used part of the code from the example to use in my own code, but now I have the problem that the code "hangs" when it wakes up. When I am in debug mode I see that when the Wake up interrupt is triggered, the code returns close to the __WFI(); command. When I press "step over" it goes to the first line after __WFI(); Now when I press play the code runs as it should. But if I´m not in debug mode the microprocessor doesnt do anything anymore after waking up. Any ideas why this could be?
0 Kudos

229 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pboogaards on Wed Dec 05 12:29:13 MST 2012
Hi Frank
I would recommend reviewing the PMU example in the Sample Code Bundles found at http://www.lpcware.com/gfiles/devper/lpc11Uxx
The example covers sleep, deep sleep, power-down, and deep power-down.

Paul
0 Kudos