enCoRe™ V CY7C643xx, enCoRe™ V LV CY7C604xx TRM, Document No. 001-32519 Rev *H
75
External Crystal Oscillator (ECO)
Figure 10-2. State Transition Between ECO and ILO
10.2
Application Overview
To use a 32.768-kHz external crystal, the GPIO pins that
connect to the crystal must be set to the High-impedance
drive mode. See the
General-Purpose I/O (GPIO) chapter
for information on GPIOs and their drive modes.
The firmware steps involved in switching between the ILO to
the 32.768-kHz ECO are as follows.
At reset, the device begins operation using the ILO.
1. Set the ECO EX bit to allow crystal operation.
2. Modify bits [2:0] in the External Crystal Oscillator
ENBUS Register to be 011b.
3. Select a sleep interval of one second, using bits[4:3] in
the Oscillator Control Register 0 (OSC_CR0), as the
oscillator stabilization interval.
4. Set bit [7] in the Oscillator Control Register 0
(OSC_CR0) to '1' to enable the external crystal oscilla-
tor.
5. The ECO becomes the selected source at the end of the
one-second interval on the edge created by the sleep
interrupt logic. The one-second interval gives the oscilla-
tor time to stabilize before it becomes the active source.
The sleep interrupt need not be enabled for the switch-
over to occur. Reset the sleep timer (if this does not
interfere with any ongoing realtime clock operation), to
guarantee the interval length. Note that the ILO contin-
ues to run until the oscillator is automatically switched
over by the sleep timer interrupt.
Note
The ILO switches back instantaneously by writing the
32-kHz Select Control bit to '0'.
Note
Transitions between oscillator domains may produce
glitches on the 32-kHz clock bus. Functions that require
accuracy on the 32-kHz clock should be enabled after the
transition in oscillator domains.
ILO Inactive
ECO Active
ILO Active
ECO Inactive
This transition is allowed only if the
write once "ECO Exists" register bit
is set.
Default POR State
Set OSC_CR0[7] to activate
the ECO, then on the next
sleep interrupt, ECO becomes
the 32.768 kHz source.
Clear OSC_CR0[7] to
immediately revert back
to ILO as 32 kHz source.