AN2339
Clock management
7/20
3 Clock
management
The STR91x offers a flexible way for selecting the core and peripheral clocks, the devices
have up to four external clock source inputs: Main Oscillator, RTC, USB Clock and TIM
clocks. It also provides one output clock.
Figure 3.
Clock Management
3.1 Main
oscillator
The source for the main oscillator input is a 4 to 25 MHz external crystals connected to
STR91xF pins X1_CPU and X2_CPU or an external oscillator device connected to pin
X1_CPU, in this case the X2_CPU pin can be left open and not used.
The recommended circuitry for a crystal is shown below. C1, C2 and R1 values depend
greatly on the crystal type and manufacturer. You should ask your crystal supplier for the
best values for these components.
MII_PHYCLK
25MHz
PHYSEL
X1_CPU
X2_CPU
X1_RTC
X2_RTC
EXTCLK_T0T1
USB_CLK48M
4-25MHz
48MHz
Main
OSC
RTC
OSC
16-bit prescaler
f
OSC
PLL
32.768kHz
f
RTC
TIM01CLK
f
PLL
f
MSTR
Master CLK
1/2
1/2
BRCLK
To UART
USBCLK
To USB
To TIM0 & TIM1
EXTCLK_T2T3
16-bit prescaler
TIM23CLK
To TIM2 & TIM3