GD32E23x User Manual
75
4.2.2.
Characteristics
4 to 32 MHz High speed crystal oscillator (HXTAL)
Internal 8 MHz RC oscillator (IRC8M)
Internal 28 MHz RC oscillator (IRC28M)
32.768 KHz Low speed crystal oscillator (LXTAL)
Internal 40 KHz RC oscillator (IRC40K)
PLL clock source can be HXTAL or IRC8M
HXTAL clock monitor
4.2.3.
Function overview
High Speed Crystal Oscillator (HXTAL)
The high speed crystal oscillator (HXTAL), which has a frequency from 4 to 32 MHz,
produces a highly accurate clock source for use as the system clock. A crystal with a specific
frequency must be connected and located close to the two HXTAL pins. The external resistor
and capacitor components connected to the crystal are necessary for proper oscillation.
Figure 4-3. HXTAL clock source
OSCIN
OSCOUT
C1
C2
Cryst al
The HXTAL crystal oscillator can be switched on or off using the HXTALEN bit in the control
register 0, RCU_CTL0. The HXTALSTB flag in control register 0, RCU_CTL0 indicates if the
high-speed external crystal oscillator is stable. When the HXTAL is powered up, it will not be
released for use until this HXTALSTB bit is set by the hardware. This specific delay period is
known as the oscillator “Start-up time”. As the HXTAL becomes stable, an interrupt will be
generated if the related interrupt enable bit HXTALSTBIE in the Interrupt register RCU_INT
is set. At this point the HXTAL clock can be used directly as the system clock source or the
PLL input clock.
Select external clock bypass mode by setting the HXTALBPS and HXTALEN bits in the
control register 0, RCU_CTL0. The CK_HXTAL is equal to the external clock which drives
the OSCIN pin.