Download Print this page

ST STM32U3 Application Note page 18

Advertisement

4.1.2
External source (HSE bypass)
In this mode, an external clock source must be provided. This mode is selected by setting the HSEBYP and
HSEON bits in the RCC_CR. The external clock signal with ca. 40-60 % duty cycle depending on the frequency
(refer to the datasheet) must drive the OSC_IN pin while the OSC_OUT pin can be used as a GPIO (see
The bypass mode is optimized for square input signals when HSEEXT = 1. If the input is a sine wave or triangle
signal, HSEEXT must be kept at 0 (analog bypass mode).
Note:
For details on pin availability, refer to the pinout section of the datasheet.
4.2
HSI16 clock
The HSI16 clock signal is generated from an internal 16 MHz RC oscillator. The HSI16 RC oscillator provides a
clock source at low cost (no external components). It also has a faster start-up time than the HSE crystal
oscillator. However, even with calibration, the frequency is less accurate than an external crystal oscillator or
ceramic resonator.
4.3
MSI (MSIS and MSIK) clocks
The MSI is made of two internal RC oscillators: MSIRC0 at 96 MHz and MSIRC1 at 24 MHz. Each oscillator feeds
a prescaler providing a division by 1, 2, 4 or 8. Two output clocks are generated from these divided oscillators:
MSIS, that can be selected as system clock, and MSIK, that can be selected by some peripherals as kernel clock.
For each output clock MSIS and MSIK, the oscillator source is selected using respectively MSISSEL and
MSIKSEL, and the division factor is selected using respectively MSISDIV[1:0] and MSIKDIV[1:0] in
RCC_ICSCR1. A total of six different frequencies are available, generated from the two internal RCs, ranging
from 3 to 96 MHz. 24 MHz and 12 MHz can be generated from both RCs. In case no higher frequency is needed
in the application, it is recommended to select MSIRC1 to get lower consumption. In case 48 MHz or 96 MHz
frequency is also needed in addition to 24 or 12 MHz, it is recommended to select MSIRC0 and generate both
frequencies from the same oscillator rather than using both RCs, in order to save additional RC consumption.
The MSI oscillator has the advantage of providing a low-cost (no external components) low-power clock source.
In addition, when used in PLL-mode with the LSE or HSE, the MSI provides a very accurate clock source that can
be used by the USB peripheral.
Hardware autocalibration with LSE or HSE (PLL-mode)
When a 32.768 kHz, a 32 MHz or a 16 MHz external oscillator is present in the application, it is possible to
configure MSIS, MSIK or both in a PLL mode. The long-term accuracy of the MSI in PLL-mode is the one of the
external oscillators.
Using the MSI in PLL-mode with LSE provides a low-power solution to get an accurate high speed clock.
When MSIRC1 is used in PLL-mode with LSE, the reached frequency can be selected thanks to MSIPLL1N[1:0]
bitfield in the RCC_ICSR1. Those additional frequencies are useful for audio applications.
For more details on how to measure the MSI frequency variation, refer to section Internal/external clock
measurement with TIM15/TIM16/TIM17 in the RCC section of the document [1].
4.4
LSE clock
The LSE crystal is a 32.768 kHz low-speed external crystal or ceramic resonator (see
low‑power but highly accurate clock source to the RTC (real-time clock) peripheral for clock/calendar or other
timing functions.
The crystal oscillator driving strength can be changed at runtime using the LSEDRV[1:0] bits in RCC_BDCR, to
obtain the best compromise between robustness and short start-up time on one side, and low-power-consumption
on the other side. The LSE drive must be programmed before enabling the LSE.
External source (LSE bypass)
In this mode, an external clock source must be provided. This mode is selected by setting the LSEBYP and
LSEON bits in the RCC_BDCR. The external clock signal (square, sinus, or triangle) with ~50 % duty cycle, must
drive the OSC32_IN pin while the OSC32_OUT pin can be used as GPIO (see
AN6011 - Rev 1
AN6011
Table
Table
3). It provides a
Table
3).
page 18/38
Clocks
3).

Advertisement

loading
Need help?

Need help?

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

Questions and answers

Subscribe to Our Youtube Channel