lpcware

LPC1224 Not coming out of Deep-Sleep

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by thunderBird on Fri Aug 03 20:23:54 MST 2012
Hello Everyone, I'm using a LPC1224 and have designed the hardware such that when there is a falling edge on PIO0_4, an interrupt is executed which puts the controller into Deep Sleep mode. I've configured the deep-sleep mode such that when the NEXT rising edge comes on PIO0_4 the controller should Wake Up. But this doesn't seem to be happening.

Following is the code which puts the controller into deep sleep...
<code>

//Choose Deep sleep mode
SCB->SCR |= ((1 << 2));

LPC_SYSCON->PDSLEEPCFG = 0x0000FFFF;
LPC_SYSCON->PDRUNCFG &= (~(0xFF));
LPC_SYSCON->INTNMI = 0x00000010;


//Next, we set up the Power Management Unit
LPC_PMU->PCON &= (~(1 << 1));//DPDEN = 0


//Set up the wake up
LPC_SYSCON->STARTAPRP0 |= (1 << 4);
LPC_SYSCON->STARTRSRP0CLR |= (1 << 4);
LPC_SYSCON->STARTERP0 |= (1 << 4);

LPC_SYSCON->STARTAPRP0 |= (1 << 10);
LPC_SYSCON->STARTRSRP0CLR |= (1 << 10);
LPC_SYSCON->STARTERP0 |= (1 << 10);

NVIC_EnableIRQ(WAKEUP4_IRQn);
NVIC_EnableIRQ(WAKEUP10_IRQn);

//We are done setting up the PMU

//Now we go to sleep!
__WFI();

</code>

Is there an issue in using the same IO for putting the controller into deep-sleep and then waking it as well?

Any kind of help/advice would be much appreciated!

Outcomes