
GD32L23x User Manual
86
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.
Internal 16 MHz RC Oscillator (IRC16M)
The Internal 16 MHz RC oscillator, IRC16M, has a fixed frequency of 16 MHz and is the
default clock source selection for the CPU when the device is powered up. The IRC16M
oscillator provides a lower cost type clock source as no external components are required.
The IRC16M RC oscillator can be switched on or off using the IRC16MEN bit in the control
register 0, RCU_CTL0. The IRC16MSTB flag in the control register 0, RCU_CTL0, is used to
indicate if the internal RC oscillator is stable. The start-up time of the IRC16M oscillator is
shorter than the HXTAL crystal oscillator. An interrupt can be generated if the related interrupt
enable bit, IRC16MSTBIE, in the interrupt register, RCU_INT, is set when the IRC16M
becomes stable. The IRC16M clock can also be used as the PLL input clock.
The frequency accuracy of the IRC16M 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 IRC16M clock to be the system
clock when the system initially wakes-up.
IRC16M can be switched on by LPUART / USART0 / USART1 / I2C0 / I2C1 / I2C2 during
deep-sleep mode.
If the IRC16M switch on during deep-sleep state
,
the unworked peripheral
should been disabled for save power.
Internal 48M RC oscillators (IRC48M)
The internal 48M RC oscillator, IRC48M, has a fixed frequency of 48 MHz. The IRC48M
oscillator provides a lower cost type clock source as no external components are required
when USBD used. The IRC48M RC oscillator can be switched on or off using the IRC48MEN
bit in the RCU_CTL0 Register. The IRC48MSTB flag in the RCU_CTL0 Register is used to
indicate if the internal 48M RC oscillator is stable. An interrupt can be generated if the related
interrupt enable bit, IRC48MSTBIE, is set when the IRC48M becomes stable. The IRC48M
clock is used for the clocks of USBD.
The frequency accuracy of the IRC48M can be calibrated by the manufacturer, but its
operating frequency is still not enough accurate because the USB need the frequency must
between 48MHz with 500ppm accuracy. A hardware automatically dynamic trim performed in
CTC unit adjust the IRC48M to the needed frequency.
Phase Locked Loop (PLL)
The internal Phase Locked Loop, PLL, can provide 16 ~ 64 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 register 0,