Hi,
Normal Sleep after DeepSleep also causes the LPC11u68 to go into DeepSleep.
First I invoke the following to initiate DeepSleep:
SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk; // Set the DeepSleep-Bit
LPC_PMU->PCON = PMU_PCON_PM_DEEPSLEEP;
__WFI();
I wake up from it with the RTC Alarm Interrupt.
Then I call the following to go into normal Sleep:
// Unset the SLEEPDEEP Bit and enable all Interrupts to cause a Wakeup
SCB->SCR = SCB_SCR_SEVONPEND_Msk;
LPC_PMU->PCON = PMU_PCON_PM_SLEEP | PMU_PCON_SLEEPFLAG | PMU_PCON_NODPD;
__WFI();
From that, I want to wakeup with LPC_TIMER32_0, but the Interrupt doesn't happen.
I have replaced the sleep with a busy-loop and the Interrupt happened.
I have also tested the normal Sleep code before a DeepSleep and everything works as expected.
(See Section 5.2.1.1 in the LPC11u68 User Manual, Page 64)
Thank you for taking your time to look at this
Simon