
EM358x
Rev. 0.4
45
5.4.2
Sleep Timer
The EM358x integrates a 32-bit timer dedicated to system timing and waking from sleep at specific times. The
sleep timer can use either the calibrated 1 kHz reference (CLK1K), or the 32 kHz crystal clock (CLK32K). The
default clock source is the internal 1 kHz clock.
The sleep timer has a prescaler, a divider of the form 2^N, where N can be programmed from 1 to 2^15. This
divider allows for very long periods of sleep to be timed. Ember software’s default configuration is to use the
prescaler to always produce a 1024 Hz sleep timer tick. The timer provides two compare outputs and wrap
detection, all of which can be used to generate an interrupt or a wake up event.
While it is possible to do so, by default the sleep timer is not paused when the debugger halts the ARM
®
Cortex
TM
-
M3. Silicon Labs does not advise pausing the sleep timer when the debugger halts the CPU.
To save current during deep sleep, the low-frequency internal RC oscillator (OSCRC) can be turned off. If
OSCRC is turned off during deep sleep and a low-frequency 32.768 kHz crystal oscillator is not being used, then
the sleep timer will not operate during deep sleep and sleep timer wake events cannot be used to wake up the
EM358x.
Ember software provides the system timer software API for interacting with the sleep timer as well as using the
sleep timer and RC oscillator during deep sleep.
5.4.3
Event Timer
The SysTick timer is an ARM
®
standard system timer in the NVIC. The SysTick timer can be clocked from either
the FCLK (the clock going into the CPU) or the Sleep Timer clock. FCLK is either the SYSCLK or PCLK as
selected by CPU_CLKSEL register (see the Clock Switching section).
5.5 Power Management
The EM358x’s power management system is designed to achieve the lowest deep sleep current consumption
possible while still providing flexible wakeup sources, timer activity, and debugger operation. The EM358x has
four main sleep modes:
Idle Sleep: Puts the CPU into an idle state where execution is suspended until any interrupt occurs. All power
domains remain fully powered and nothing is reset.
Deep Sleep 1: The primary deep sleep state. In this state, the core power domain is fully powered down and
the sleep timer is active.
Deep Sleep 2: The same as Deep Sleep 1 except that the sleep timer is inactive to save power. In this mode
the sleep timer cannot wake up the EM358x.
Deep Sleep 0 (also known as Emulated Deep Sleep): The chip emulates a true deep sleep without powering
down the core domain. Instead, the core domain remains powered and all peripherals except the system
debug components (ITM, DWT, FPB, NVIC) are held in reset. The purpose of this sleep state is to allow
EM358x software to perform a deep sleep cycle while maintaining debug configuration such as breakpoints.
CSYSPWRUPREQ, CDBGPWRUPREQ, and the corresponding CSYSPWRUPACK and CDBGPWRUPACK are
bits in the debug port’s CTRL/STAT register in the SWJ. For further information on these bits and the operation of
the SWJ-DP please refer to the ARM Debug Interface v5 Architecture Specification (ARM IHI 0031A).
For further power savings when not in deep sleep, the USB, ADC, Timer 1, Timer 2, Serial Controller 1, and Serial
Controller 2 peripherals can be individually disabled through the PERIPHERAL_DISABLE register. Disabling a
peripheral saves power by stopping the clock feeding that peripheral. A peripheral should only be disabled
through the PERIPHERAL_DISABLE register when the peripheral is idle and disabled through the peripheral's
own configuration registers, otherwise undefined behavior may occur. When a peripheral is disabled through the
PERIPHERAL_DISABLE register, all registers associated with that peripheral ignore all subsequent writes, and
subsequent reads return the value seen in the register at the moment the peripheral is disabled.
5.5.1
Wake Sources
When in deep sleep the EM358x can be returned to the running state in a number of ways, and the wake sources
are split depending on deep sleep 1 or deep sleep 2.
The following wake sources are available in both deep sleep 1 and 2.
Wake on GPIO activity: Wake due to change of state on any GPIO.
Summary of Contents for EMBER EM358 series
Page 2: ...EM358x 2 Rev 0 4 ...
Page 7: ...EM358x Rev 0 4 7 ...