Clock Control
129
SPRUH22I – April 2012 – Revised November 2019
Copyright © 2012–2019, Texas Instruments Incorporated
System Control and Interrupts
For power saving purposes, the master subsystem Cortext-M3 RCGCx (run mode clock configuration),
SCGCx (sleep mode clock configuration), and DSCGCx (deep sleep mode clock configuration) registers
are used to control the clocks to each module, while the Cortext-M3 CPU is in run, sleep and deep sleep
modes, respectively. These modes are defined below.
Run Mode
In run mode, the M3 CPU actively executes code. Run mode provides normal
operation of the M3 CPU and all of the peripherals on the M3 subsystem, currently
enabled by the RCGCx registers.
Sleep Mode
In sleep mode, the clock frequency of the active peripherals is unchanged, but the M3
CPU and its memory subsystem are not clocked and therefore no longer execute
code. Sleep mode is entered by the Cortex-M3 core executing a WFI (Wait for
Interrupt) instruction. Any properly configured interrupt event in the system brings the
processor back into run mode. See the system control NVIC section of the
ARM®
Cortex-M3 Technical Reference Manual
for more details. Peripherals enabled in the
SCGCx register are clocked when auto-clock gating is enabled (RCC register) or the
RCGCx register when the auto-clock gating is disabled. The M3 subsystem clock
frequency is the same as during run mode.
Note:
This mode is equivalent to the conventional IDLE mode in C2000 devices.
Deep-Sleep
Mode:
In deep-sleep mode, the clock frequency of the active peripherals may change
(depending on the deep sleep mode clock configuration) in addition to the M3 CPU
clock being stopped. An interrupt returns the M3 CPU to run mode by a request from
the code. Deep-sleep mode is entered by first writing the deep sleep enable bit in the
ARM Cortex-M3 NVIC system control register and then executing a WFI instruction.
Any properly configured interrupt event in the system brings the processor back into
Run mode. See the system control NVIC section of the
ARM® Cortex-M3 Technical
Reference Manual
for more details.
The device configuration registers which act as write masks to the above clock configuration registers are
DC1, DC2, DC4, DC6, and DC10. Refer to
for more details on device configuration
registers.
The Cortex-M3 processor and the memory subsystem are not clocked. Peripherals are clocked that are
enabled in the DCGCx register when auto-clock gating is enabled (see the RCC register), or the RCGCx
register when auto-clock gating is disabled. The system clock source in deep-sleep mode is specified in
the DSLPCLKCFG register. The DSLPCLKCFG register is used to choose one of three clock sources,
namely the MAIN OSCCLK (X1/X2) or the INTOSC (10 MHz) clock or 32 kHz clock. The main oscillator
macros can be powered-down in deep sleep mode if either the 10 MHz or 32 kHz is chosen as the clock.
If the PLL is running at the time of the WFI instruction during deep-sleep mode, hardware powers the PLL
down. The ACG bit in the RCC register determines the clock gating controls in deep sleep mode, and the
clock frequency is determined by the DSDIVORIDE setting in the DSLPCLKCFG register with up to /16 or
/64, respectively. When the deep-sleep exit event occurs, hardware brings the system clock back to the
source and frequency it had at the onset of deep-sleep mode before enabling the clocks that had been
stopped during the deep-sleep duration.