CY8C28xxx PSoC Programmable System-on-Chip TRM, Document No. 001-52594 Rev. *G
107
Sleep and Watchdog
12.4.3
Bandgap Refresh
During normal operation, the bandgap circuit provides a
voltage reference (VRef) to the system, for use in the analog
blocks, Flash, and
circuitry. Nor-
mally, the bandgap output is connected directly to the VRef
signal. However, during sleep, the
gen-
erator block and LVD circuits are completely powered down.
The bandgap and LVD blocks are periodically re-enabled
during sleep, to monitor for low voltage conditions. This is
accomplished by turning on the bandgap periodically, allow-
ing it time to start up for a full 32 kHz clock period, and con-
necting it to VRef to refresh the reference voltage for the
following 32 kHz clock period as shown in
.
During the second 32 kHz clock period of the refresh cycle,
the LVD circuit is allowed to settle during the
of
the 32 kHz clock. During the low period of the second 32
kHz clock, the LVD interrupt is allowed to occur.
Figure 12-3. Bandgap Refresh Operation
The rate at which the refresh occurs is related to the 32 kHz
clock and controlled by the Power System Sleep Duty Cycle
(PSSDC), bits [7:6] of the ECO_TR register).
enumerates the available selections. The default setting
(256 sleep timer counts) is applicable for many applications,
giving a typical average device current under 5
A.
12.4.4
Watchdog Timer
On device boot up, the Watchdog Timer (WDT) is initially
disabled. The PORS bit in the system control register con-
trols the enabling of the WDT. On boot, the PORS bit is ini-
tially set to '1', indicating that either a POR or XRES event
has occurred. The WDT is enabled by clearing the PORS
bit. After this bit is cleared and the watchdog timer is
enabled, it cannot be subsequently disabled. (The PORS bit
cannot be set to '1' in firmware; it can only be cleared.)
The only way to disable the Watchdog function, after it is
enabled, is through a subsequent POR or XRES. Although
the WDT is disabled during the first time through initializa-
tion code after a POR or XRES, all code should be written
as if it is enabled (that is, the WDT should be cleared period-
ically). This is because, in the initialization code after a WDR
event, the watchdog timer is enabled so all code must be
aware of this.
The watchdog timer is three counts of the sleep timer inter-
rupt output. The watchdog interval is three times the
selected sleep timer interval. The available selections for the
watchdog interval are shown in
. When the sleep
timer interrupt is asserted, the watchdog timer increments.
When the counter reaches three, a terminal count is
asserted. This terminal count is registered by the 32 kHz
clock. Therefore, the WDR (Watchdog Reset) signal will go
high after the following edge of the 32 kHz clock and be held
asserted for one cycle (30
s nominal). The
that
registers the WDT terminal count is not reset by the WDR
signal when it is asserted, but is reset by all other resets.
This timing is shown in
.
Figure 12-4. Watchdog Reset
When enabled, the WDT must be periodically cleared in
firmware. This is accomplished with a write to the
RES_WDT register. This write is data independent, so any
write will clear the watchdog timer. (Note that a write of 38h
will also clear the sleep timer.) If for any reason the firmware
fails to clear the WDT within the selected interval, the circuit
will assert WDR to the device. WDR is equivalent in effect to
any other reset. All internal registers are set to their reset
state, see the table titled
“Details of Functionality for Various
. An important aspect to remember
about WDT resets is that RAM initialization can be disabled
(IRAMDIS in the CPU_SCR1 register). In this case, the
SRAM contents are unaffected; so that when a WDR
occurs, program variables are persistent through this reset.
Table 12-4. Power System Sleep Duty Cycle Selections
PSSDC
Sleep Timer Counts
Period (Nominal)
00b (default)
256
8 ms
01b
1024
31.2 ms
10b
64
2 ms
11b
16
500
s
CLK32K
Band Gap
VRef
Bandgap is turned on,
but not yet connected
to VRef.
VRef is slowly
leaking to ground.
Bandgap output is
connected to VRef.
Voltage is refreshed.
Bandgap is powered
down until next
refresh cycle.
Low voltage monitors are
active during CLK32K low.
SLEEP INT
WD RESET
(WDR)
CLK32K
2
WD COUNT
3
0
Summary of Contents for CY8C28 series
Page 65: ...64 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G RAM Paging ...
Page 125: ...124 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Page 311: ...310 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G IDAC_CR0 1 FDh ...
Page 317: ...316 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Page 393: ...392 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...
Page 477: ...476 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G Digital Clocks ...
Page 561: ...560 CY8C28xxx PSoC Programmable System on Chip TRM Document No 001 52594 Rev G ...