70
PSoC CY8CTMG20x and CY8CTST200 TRM, Document No. 001-53603 Rev. *C
External Crystal Oscillator (ECO)
Figure 9-2. State Transition Between ECO and ILO
9.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 Inter-
nal Low Speed Oscillator (ILO) to the 32.768 kHz External
Crystal Oscillator (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.
Summary of Contents for PSoC CY8CTMG20 Series
Page 4: ...4 Contents Overview Feedback...
Page 26: ...26 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Section B PSoC Core Feedback...
Page 82: ...82 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Sleep and Watchdog Feedback...
Page 134: ...134 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C I2C Slave Feedback...
Page 142: ...142 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C System Resets Feedback...
Page 160: ...160 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C SPI Feedback...
Page 182: ...182 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Full Speed USB Feedback...
Page 302: ...302 PSoC CY8CTMG20x and CY8CTST200 TRM Document No 001 53603 Rev C Glossary Feedback...