Reset and clock control for STM32F405xx/07xx and STM32F415xx/17xx(RCC)
RM0090
218/1731
DocID018909 Rev 11
External source (HSE bypass)
In this mode, an external clock source must be provided. You select this mode by setting the
HSEBYP and HSEON
bits in the
RCC clock control register (RCC_CR)
. The external clock
signal (square, sinus or triangle) with ~50% duty cycle has to drive the OSC_IN pin while the
OSC_OUT pin should be left HI-Z. See
External crystal/ceramic resonator (HSE crystal)
The HSE has the advantage of producing a very accurate rate on the main clock.
The associated hardware configuration is shown in
. Refer to the electrical
characteristics section of the
datasheet
for more details.
The HSERDY flag in the
RCC clock control register (RCC_CR)
indicates if the high-speed
external oscillator is stable or not. At startup, the clock is not released until this bit is set by
hardware. An interrupt can be generated if enabled in the
The HSE Crystal can be switched on and off using the HSEON bit in the
7.2.2 HSI
clock
The HSI clock signal is generated from an internal 16 MHz RC oscillator and can be used
directly as a system clock, or used as PLL input.
The HSI RC oscillator has the advantage of providing a clock source at low cost (no external
components). It also has a faster startup time than the HSE crystal oscillator however, even
with calibration the frequency is less accurate than an external crystal oscillator or ceramic
resonator.
Figure 22. HSE/ LSE clock sources
Hardware configuration
External clock
Crystal/ceramic
resonators
OSC_OUT
External
source
(HI-Z)
OSC_IN OSC_OUT
Load
capacitors
C
L2
C
L1