The device operating mode is configured through the use of the following:
- Policy bits in the SYSOSCCFG and MCLKCFG registers in SYSCTL (to control the behavior of SYSOSC in RUN, SLEEP, and STOP modes)
- Policy bits in the PMODECFG register in SYSCTL (to set the deep sleep level of STOP, STANDBY or SHUTDOWN)
- SLEEPDEEP policy bit in the SCR local CPU register (to select whether a WFI instruction triggers SLEEP mode or STOP/STANDBY/SHUTDOWN mode)
- Use of the ArmĀ® WFI (wait for interrupt) CPU instruction (to enter the configured SLEEP/STOP/STANDBY/SHUTDOWN state)
Before entering an operating mode where the CPU is disabled, make sure that the appropriate peripheral that can wake the CPU from sleep has been configured to generate a CPU interrupt on the desired event.
For a detailed description of the behavior of each operating mode, see the associated operating mode section.
Policy Bit Configuration
Table 3-17 defines how to configure the relevant policy bits for each operating mode. All values are indicated in binary format. A dash (-) indicates that the particular policy bit is a don't care for the specified operating mode.
Table 3-17 Operating Mode Policy Bit Configuration
| Operating Mode Policy Control |
RUN |
SLEEP(1) |
STOP |
STANDBY |
SHUTDOWN |
| Register |
Bit |
RUN0 |
SLEEP0 |
STOP0 |
STANDBY0 |
STANDBY1 |
| MCLKCFG |
STOPCLKSTBY |
- |
- |
- |
0 |
1 |
1 |
| PMODECFG |
DSLEEP |
- |
- |
00 |
01 |
01 |
10 |
| SCR |
SLEEPDEEP |
0 |
0 |
1 |
1 |
1 |
1 |
(1) SLEEP mode behavior is always identical to RUN mode, except with the CPUCLK disabled. As such, the SLEEP behavior is determined by the configuration of RUN mode.
Entering SLEEP Mode
Entering SLEEP mode disables the CPU, but otherwise maintains the same configuration as RUN. To enter SLEEP mode:
- Configure the CPU for SLEEP by clearing the SLEEPDEEP bit in the local SCR register.
- Enter selected mode by executing the WFI (wait for interrupt) CPU instruction.
Entering STOP or STANDBY Modes
To enter STOP or STANDBY mode:
- Configure the PMODECFG register in SYSCTL to 0b00 (STOP) or 0b01 (STANDBY).
- Configure the CPU for DEEP SLEEP by setting the SLEEPDEEP bit in the local SCR register.
- Enter selected mode by executing a WFI (wait for interrupt) CPU instruction.
Entering SHUTDOWN Mode
To enter SHUTDOWN mode:
- Configure the PMODECFG register in SYSCTL to 0b10 (SHUTDOWN).
- Configure the CPU for DEEP SLEEP by setting the SLEEPDEEP bit in the local SCR register.
- Enter selected mode by executing a WFI (wait for interrupt) CPU instruction.