
Rev. 1.00
83 of 576
January 28, 2022
32-Bit Arm
®
Cortex
®
-M0+ MCU
HT32F54231/HT32F54241/HT32F54243/HT32F54253
6 Clock Control Unit (CKCU)
6 Clock Control Unit (CKCU)
The HSE crystal oscillator can be switched on or off using the HSEEN bit in the Global Clock
Control Register (GCCR). The HSERDY flag in the Global Clock Status Register (GCSR) will
indicate if the high speed external crystal oscillator is stable. While switching on the HSE, the HSE
clock will still not be released until this HSERDY bit is set by the hardware. The specific delay
period is well-known as “Start-up time”. As the HSE becomes stable, the HSE clock can then be
used directly as the system clock source or be used as the PLL input clock.
High Speed Internal RC Oscillator – HSI
The high speed internal 8 MHz RC oscillator (HSI) is the default selection of clock source for the
CPU when the device is powered up. The HSI RC oscillator provides a clock source in a lower cost
because no external components are required. The HSI RC oscillator can be switched on or off
using the HSIEN bit in the Global Clock Control Register (GCCR). The HSIRDY flag in the Global
Clock Status Register (GCSR) will indicate if the internal RC oscillator is stable. The start-up time
of HSI is shorter than the HSE crystal oscillator. The HSI clock can also be used as the PLL input
clock.
The accuracy of the frequency of the high speed internal RC oscillator HSI can be calibrated via the
configuration options, but it is still less accurate than the HSE crystal oscillator. The applications,
the environments and the cost will determine the use of the oscillators.
Software could configure the Power Saving Wakeup RC Clock Enable bit, PSRCEN, to 1 to force
the HSI clock to be the system clock when waking up from the Deep-Sleep1 or Deep-Sleep2 mode.
Subsequently, the system clock is back to the original clock source (HSE or PLL) if the original
clock source ready flag is asserted. This function can reduce the wakeup time when using HSE or
PLL as system clock.
Auto Trimming of High Speed Internal RC Oscillator – HSI
The frequency accuracy of the high speed internal RC oscillator HSI can vary from one chip to
another due to manufacturing process variations, this is why each device is factory calibrated
by Holtek for ±2 % accuracy at V
DD
= 5.0 V and T
A
= 25 °C. But the accuracy is not enough for
some application and environment requirements. Therefore, this device provides the trimming
mechanism for HSI frequency calibration using a more accurate external reference clock. The
detailed block diagram is shown as the following figure.
After reset, the factory trimming value is loaded in HSICOARSE[4:0] and HSIFINE[7:0] bits in
the HSI Control Register (HSICR). The HSI frequency accuracy may be affected by voltage or
temperature variations. If the application has to be driven by a more accurate HSI frequency, users
can manually trim the HSI frequency using the HSIFINE[7:0] in the HSI Control Register (HSICR)
or automatically adjust the HSI frequency using the Auto Trimming Controller (ATC) together
with an external reference clock in the application. The reference clock can be provided from the
following clock sources:
▆
32,768 Hz low speed external crystal or ceramic resonator oscillator LSE output clock
▆
External pin (CKIN) with 1 kHz pulse