GD32F3x0 User Manual
74
Select external clock bypass mode by setting the HXTALBPS and HXTALEN bits in the
Control Register RCU_CTL. During bypass mode, the signal is connected to OSCIN, and
OSCOUT remains in the suspended state, as shown in Figure 4-4. HXTAL clock source in
bypass mode. The CK_HXTAL is equal to the external clock which drives the OSCIN pin.
Figure 4-4. HXTAL clock source in bypass mode
Internal 8 MHz RC Oscillator (IRC8M)
The Internal 8 MHz 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 register0,
RCU_CTL0. The IRC8MSTB flag in the control register0, RCU_CTL0 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 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)
The internal Phase Locked Loop, PLL, can provide 16~108 MHz clock output which is 2 ~64
multiples of a fundamental reference frequency of 4 ~ 32 MHz.
The PLL can be switched on or off by using the PLLEN bit in the control register0,
RCU_CTL0. The PLLSTB flag in the control register0, RCU_CTL0 will indicate if the PLL
clock is stable. An interrupt can be generated if the related interrupt enable bit, PLLSTBIE, in
the Interrupt register, RCU_INT, is set as the PLL becomes stable.
Internal 28 MHz RC Oscillator (IRC28M)
The Internal 28 MHz RC Oscillator, IRC28M, has a fixed frequency of 28 MHz and dedicated