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...
//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);
//We are done setting up the PMU
//Now we go to sleep!
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!