
CY7C63310
CY7C638xx
Document 38-08035 Rev. *I
Page 26 of 74
12.0
Sleep Mode
The CPU can only be put to sleep by the firmware. This is
accomplished by setting the Sleep bit in the System Status and
Control Register (CPU_SCR). This stops the CPU from
executing instructions, and the CPU will remain asleep until an
interrupt comes pending, or there is a reset event (either a
Power-on Reset, or a Watchdog Timer Reset).
The Low-voltage Detection circuit (LVD) drops into fully
functional power-reduced states, and the latency for the LVD
is increased. The actual latency can be traded against power
consumption by changing Sleep Duty Cycle field of the
ECO_TR Register.
The Internal 32 KHz Low-speed Oscillator remains running.
Prior to entering suspend mode, firmware can optionally
configure the 32 KHz Low-speed Oscillator to operate in a low-
power mode to help reduce the over all power consumption
(Using Bit 7,
Table 10-2
). This will help save approximately
5
μ
A; however, the trade off is that the 32 KHz Low-speed
Oscillator will be less accurate.
All interrupts remain active. Only the occurrence of an interrupt
will wake the part from sleep. The Stop bit in the System Status
and Control Register (CPU_SCR) must be cleared for a part
to resume out of sleep. The Global Interrupt Enable bit of the
CPU Flags Register (CPU_F) does not have any effect. Any
unmasked interrupt will wake the system up. As a result, any
interrupts not intended for waking must be disabled through
the Interrupt Mask Registers.
When the CPU enters sleep mode the CPUCLK Select (Bit 1,
Table 10-3
) is forced to the Internal Oscillator. The internal
oscillator recovery time is three clock cycles of the Internal 32
KHz Low-power Oscillator. The Internal 24 MHz Oscillator
restarts immediately on exiting Sleep mode. If an external
clock is used, firmware will need to switch the clock source for
the CPU.
On exiting sleep mode, once the clock is stable and the delay
time has expired, the instruction immediately following the
sleep instruction is executed before the interrupt service
routine (if enabled).
The Sleep interrupt allows the microcontroller to wake up
periodically and poll system components while maintaining
very low average power consumption. The Sleep interrupt
may also be used to provide periodic interrupts during non-
sleep modes.
12.1
The SLEEP bit is an input into the sleep logic circuit. This
circuit is designed to sequence the device into and out of the
hardware sleep state. The hardware sequence to put the
device to sleep is shown in
Figure 12-1
and is defined as
follows.
1.Firmware sets the SLEEP bit in the CPU_SCR0 register. The
Bus Request (BRQ) signal to the CPU is immediately
asserted. This is a request by the system to halt CPU
operation at an instruction boundary. The CPU samples BRQ
on the positive edge of CPUCLK.
2.Due to the specific timing of the register write, the CPU
issues a Bus Request Acknowledge (BRA) on the following
positive edge of the CPU clock. The sleep logic waits for the
following negative edge of the CPU clock and then asserts a
system-wide Power Down (PD) signal. In
Figure 12-1
the CPU
is halted and the system-wide power down signal is asserted.
3.The system-wide PD (power down) signal controls several
major circuit blocks: The Flash memory module, the internal
24 MHz oscillator, the EFTB filter and the bandgap voltage
reference. These circuits transition into a zero power state.
The only operational circuits on chip are the Low Power oscil-
lator, the bandgap refresh circuit, and the supply voltage
monitor (POR/LVD) circuit.
Note:
To achieve the lowest possible power consumption
during suspend/sleep, the following conditions must be
observed in addition to considerations for the sleep timer:
All GPIOs must be set to outputs and driven low
The USB pins P1.0 and P1.1 should be configured as inputs
with their pull-ups enabled.
Sleep Sequence
Table 11-2. Reset Watchdog Timer (RESWDT) [0xE3] [W]
Bit #
7
6
5
4
3
2
1
0
Field
Reset Watchdog Timer [7:0]
Read/Write
W
W
W
W
W
W
W
W
Default
0
0
0
0
0
0
0
0
Any write to this register will clear Watchdog Timer, a write of 0x38 will also clear the Sleep Timer
Bit [7:0]:
Reset Watchdog Timer [7:0]