EasyManuals Logo
Home>ST>Microcontrollers>STM32L0x3

ST STM32L0x3 User Manual

ST STM32L0x3
1043 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #179 background imageLoading...
Page #179 background image
RM0367 Rev 7 179/1043
RM0367 Reset and clock control (RCC)
225
External source (HSE bypass)
In this mode, an external clock source must be provided. It can have a frequency of up to
32 MHz. This mode is selected by setting the HSEBYP and HSEON
bits in the RCC_CR
register (see Section 7.3.1: Clock control register (RCC_CR)). The external clock signal with
~50% duty cycle has to drive the OSC_IN pin while the OSC_OUT pin should be left hi-Z
(see Figure 40). The external clock signal can be square, sinus or triangle. To minimize the
consumption, it is recommended to use the square signal.
External crystal/ceramic resonator (HSE crystal)
The 1 to 24 MHz external oscillator has the advantage of producing a very accurate rate on
the main clock.
The associated hardware configuration is shown in Figure 40. Refer to the electrical
characteristics section of the datasheet for more details.
The HSERDY flag of the RCC_CR register (see Section 7.3.1) indicates whether the HSE
oscillator is stable or not. At startup, the HSE clock is not released until this bit is set by
hardware. An interrupt can be generated if enabled in the RCC_CR register.
The HSE Crystal can be switched on and off using the HSEON bit in the RCC_CR register.
For code example, refer to A.4.1: HSE start sequence code example.
7.2.2 HSI16 clock
The HSI16 clock signal is generated from an internal 16 MHz RC oscillator. It can be used
directly as a system clock or as PLL input.
The HSI16 clock can be used after wake-up from the Stop low-power mode, this ensure a
smaller wake-up time than a wake-up using MSI clock.
The HSI16 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.
Calibration
RC oscillator frequencies can vary from one chip to another due to manufacturing process
variations, this is why each device is factory calibrated by ST for 1% accuracy at an ambient
temperature, T
A
, of 25 °C.
After reset, the factory calibration value is loaded in the HSI16CAL[7:0] bits in the Internal
Clock Sources Calibration Register (RCC_ICSCR) (see Section 7.3.2).
If the application is subject to voltage or temperature variations, this may affect the RC
oscillator speed. You can trim the HSI16 frequency in the application by using the
HSI16TRIM[4:0] bits in the RCC_ICSCR register. For more details on how to measure the
HSI16 frequency variation please refer to Section 7.2.15: Internal/external clock
measurement using TIM21.
The HSI16RDY flag in the RCC_CR register indicates whether the HSI16 oscillator is stable
or not. At startup, the HSI16 RC output clock is not released until this bit is set by hardware.
The HSI16 RC oscillator can be switched on and off using the HSI16ON bit in the RCC_CR
register.

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32L0x3 and is the answer not in the manual?

ST STM32L0x3 Specifications

General IconGeneral
BrandST
ModelSTM32L0x3
CategoryMicrocontrollers
LanguageEnglish

Related product manuals