Lse Clock; Hsi Clock - ST STM32F0 Series Application Note

Hide thumbs Also See for STM32F0 Series:
Table of Contents

Advertisement

Clocks
External crystal/ceramic resonator (HSE crystal)
The 4 to 32 MHz external oscillator has the advantage of producing a very accurate rate on
the main clock. Refer to the electrical characteristics section of the datasheet for more
details about the associated hardware configuration.
The HSERDY flag in the Clock control register (RCC_CR) indicates if the HSE 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 Clock interrupt register (RCC_CIR).
The HSE Crystal can be switched on and off using the HSEON bit in the Clock control
register (RCC_CR).
External source (HSE bypass)
In this mode, an external clock source must be provided. It can have a frequency of up to
32 MHz. You select this mode by setting the HSEBYP and HSEON bits in the
register
(RCC_CR). The external clock signal (square, sinus or triangle) with ~40-60% duty
cycle depending on the frequency (refer to the datasheet) has to drive the OSC_IN pin while
the OSC_OUT pin can be used a GPIO. See
3.2

LSE clock

The LSE crystal is a 32.768 kHz Low Speed External crystal or ceramic resonator. It has the
advantage of providing a low-power but highly accurate clock source to the real-time clock
peripheral (RTC) for clock/calendar or other timing functions.
The LSE crystal is switched on and off using the LSEON bit in Backup domain control
register (RCC_BDCR). The crystal oscillator driving strength can be changed at runtime
using the LSEDRV[1:0] bits in the Backup domain control register (RCC_BDCR) to obtain
the best compromise between robustness and short start-up time on one side and low
power-consumption on the other.
The LSERDY flag in the Backup domain control register (RCC_BDCR) indicates whether
the LSE crystal is stable or not. At startup, the LSE crystal output clock signal is not
released until this bit is set by hardware. An interrupt can be generated if enabled in the
Clock interrupt register (RCC_CIR).
External source (LSE bypass)
In this mode, an external clock source must be provided. It can have a frequency of up to
1 MHz. You select this mode by setting the LSEBYP and LSEON bits in the Backup domain
control register (RCC_BDCR). The external clock signal (square, sinus or triangle) has to
drive the OSC32_IN pin while the OSC32_OUT pin can be used as GPIO. See
3.3

HSI clock

The HSI clock signal is generated from an internal 8 MHz RC oscillator and can be used
directly as a system clock or divided by 2 to be 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.
16/29
Figure
Doc ID 023035 Rev 2
9.
AN4080
Clock control
Figure
9.

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the STM32F0 Series and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Stm32f05Stm32f06An4080

Table of Contents