![GigaDevice Semiconductor GD32F20 Series User Manual Download Page 84](http://html.mh-extra.com/html/gigadevice-semiconductor/gd32f20-series/gd32f20-series_user-manual_2225801084.webp)
GD32F20x User Manual
84
Figure 5-3. HXTAL clock source
OSCIN
OSCOUT
C1
C2
Crystal
The HXTAL crystal oscillator can be switched on or off using the HXTALEN bit in the control
register RCU_CTL. The HXTALSTB flag in control register RCU_CTL 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 RCU_CTL. The CK_HXTAL is equal to the external clock which drives the
OSCIN pin.
Internal 8M RC oscillators (IRC8M)
The internal 8M RC oscillator, IRC8M, has a fixed frequency of 8 MHz and is the default clock
source selection for the CPU when the device is powered up. The IRC8M oscillator provides
a lower cost type clock source as no external components are required. The IRC8M RC
oscillator can be switched on or off using the IRC8MEN bit in the control register RCU_CTL.
The IRC8MSTB flag in the Control register RCU_CTL is used to indicate if the internal RC
oscillator is stable. The start-up time of the IRC8M oscillator is shorter than the HXTAL crystal
oscillator. An interrupt can be generated if the related interrupt enable bit, IRC8MSTBIE, in
the interrupt register, RCU_INT, is set when the IRC8M becomes stable. The IRC8M clock
can also be used as the system clock source or the PLL input clock.
The frequency accuracy of the IRC8M can be calibrated by the manufacturer, but its operating
frequency is still less accurate than HXTAL. The application requirements, environment and
cost will determine which oscillator type is selected.
If the HXTAL or PLL is the system clock source, to minimize the time required for the system
to recover from the Deep-sleep Mode, the hardware forces the IRC8M clock to be the system
clock when the system initially wakes-up.
Phase locked loop (PLL)
There are three internal Phase Locked Loop, the PLL, PLL1 and PLL2.
The internal Phase Locked Loop, PLL, can provide 16~120 MHz clock output which is 2 ~32
Summary of Contents for GD32F20 Series
Page 191: ...GD32F20x User Manual 191 Bits Fields Descriptions 31 0 TRNDATA 31 0 32 Bit Random data ...
Page 290: ...GD32F20x User Manual 290 conversion is ongoing ...
Page 325: ...GD32F20x User Manual 325 15 0 ALRM 15 0 RTC alarm value low ...
Page 385: ...GD32F20x User Manual 385 ...
Page 523: ...GD32F20x User Manual 523 clears AERR bit by writing 0 to it ...