
DR
AFT
DR
AFT
DRAFT
DR
D
RAFT
DRAFT
DRA
FT DRAF
D
RAFT DRAFT DRAFT DRAFT DRAFT D
DRAFT
D
RAFT DRA
FT DRAFT DRAFT DRAFT DRA
UM10360_0
© NXP B.V. 2009. All rights reserved.
User manual
Rev. 00.06 — 5 June 2009
727 of 808
NXP Semiconductors
UM10360
Chapter 34: Appendix: Cortex-M3 User Guide
3.5.1.3
Sleep-on-exit
If the SLEEPONEXIT bit of the SCR is set to 1, when the processor completes the
execution of an exception handler it returns to Thread mode and immediately enters sleep
mode. Use this mechanism in applications that only require the processor to run when an
exception occurs.
3.5.2 Wakeup from sleep mode
The conditions for the processor to wakeup depend on the mechanism that cause it to
enter sleep mode.
3.5.2.1
Wakeup from WFI or sleep-on-exit
Normally, the processor wakes up only when it detects an exception with sufficient priority
to cause exception entry.
Some embedded systems might have to execute system restore tasks after the processor
wakes up, and before it executes an interrupt handler. To achieve this set the PRIMASK
bit to 1 and the FAULTMASK bit to 0. If an interrupt arrives that is enabled and has a
higher priority than current exception priority, the processor wakes up but does not
execute the interrupt handler until the processor sets PRIMASK to zero. For more
information about PRIMASK and FAULTMASK see
.
3.5.2.2
Wakeup from WFE
The processor wakes up if:
•
it detects an exception with sufficient priority to cause exception entry
In addition, if the SEVONPEND bit in the SCR is set to 1, any new pending interrupt
triggers an event and wakes up the processor, even if the interrupt is disabled or has
insufficient priority to cause exception entry. For more information about the SCR see
Section 37–1.3.7 “System Control Register”
3.5.3 The Wakeup Interrupt Controller
The
Wakeup Interrupt Controller
(WIC) is a peripheral that can detect an interrupt and
wake the processor from deep sleep mode or Power-down mode. The WIC is enabled
only when the DEEPSLEEP bit in the SCR is set to 1, see
.
Details of wakeup possibilities on the LPC17xx can be found in
The WIC is not programmable, and does not have any registers or user interface. It
operates entirely from hardware signals.
When the WIC is enabled and the processor enters deep sleep mode or Power-down
mode, the power management unit in the system can power down most of the Cortex-M3
processor. This has the side effect of stopping the SysTick timer. When the WIC receives
an interrupt, it takes a number of clock cycles to wakeup the processor and restore its
state, before it can process the interrupt. This means interrupt latency is increased in deep
sleep mode. Wakeup from Power-down mode requires startup of many other portions of
the device, and takes longer.
Remark:
If the processor detects a connection to a debugger it disables the WIC.