40
Document # 001-20559 Rev. *D
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, in order to monitor for low voltage conditions.
This is accomplished by turning on the bandgap periodically,
allowing it time to start up for a full 32 kHz clock period, and
connecting 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
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. Once 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 goes
high after the following edge of the 32 kHz clock and held
asserted for one cycle (30
s nominal). The
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
Once enabled, the WDT must be periodically cleared in firm-
ware. This is accomplished with a write to the RES_WDT
register. This write is data independent, so any write clears
the watchdog timer. (Note that a write of 38h also clears the
sleep timer.) If for any reason the firmware fails to clear the
WDT within the selected interval, the circuit asserts 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 Resets” on
. 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 vari-
ables 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 PSoC CY8C23533
Page 4: ...Contents Overview 4 Document 001 20559 Rev D Section G Glossary 385 Index 401 ...
Page 16: ...Contents Overview 16 Document 001 20559 Rev D ...
Page 24: ...24 Document 001 20559 Rev D Section A Overview ...
Page 30: ...30 Document 001 20559 Rev D Pin Information ...
Page 54: ...54 Document 001 20559 Rev D Supervisory ROM SROM ...
Page 60: ...60 Document 001 20559 Rev D RAM Paging ...
Page 68: ...68 Document 001 20559 Rev D Interrupt Controller ...
Page 76: ...12 Document 001 20559 Rev D General Purpose IO GPIO ...
Page 82: ...18 Document 001 20559 Rev D Internal Main Oscillator IMO ...
Page 84: ...20 Document 001 20559 Rev D Internal Low Speed Oscillator ILO ...
Page 90: ...26 Document 001 20559 Rev D External Crystal Oscillator ECO ...
Page 94: ...30 Document 001 20559 Rev D Phase Locked Loop PLL ...
Page 106: ...42 Document 001 20559 Rev D Sleep and Watchdog ...
Page 228: ...164 Document 001 20559 Rev D Section D Digital System ...
Page 234: ...170 Document 001 20559 Rev D Array Digital Interconnect ADI ...
Page 278: ...214 Document 001 20559 Rev D Digital Blocks ...
Page 296: ...232 Document 001 20559 Rev D Analog Interface ...
Page 304: ...240 Document 001 20559 Rev D Analog Array ...
Page 308: ...244 Document 001 20559 Rev D Analog Input Configuration ...
Page 312: ...248 Document 001 20559 Rev D Analog Reference ...
Page 338: ...274 Document 001 20559 Rev D Section F System Resources ...
Page 354: ...290 Document 001 20559 Rev D Multiply Accumulate MAC ...
Page 374: ...310 Document 001 20559 Rev D I2C ...
Page 400: ...336 Document 001 20559 Rev D Section G Glossary ...