Understand the clock source and crystal oscillator of STM32

How to identify the five clock sources of STM32, namely HSI, HSE, LSI, LSE and PLL?

1.HSI is a high-speed internal clock, RC oscillator  
2.HSE is a high-speed external clock, which can be connected to a quartz/ceramic resonator, or an external clock source
3.LSI is a low-speed internal clock, RC oscillator
4.LSE is a low-speed external clock , connected to a quartz crystal with a frequency of 32.768kHz
5.PLL is the phase-locked loop frequency multiplier output, and its clock input source can be selected as HSI or HSE

If you do not use an external crystal oscillator on STM32, the connection method of OSC_IN and OSC_OUT:

If using the internal RC oscillator instead of an external crystal oscillator, please proceed as follows:

1. For 100-pin or 144-pin products: OSC_IN should be grounded and OSC_OUT should be left floating. 

2. For products with less than 100 pins: there are two connection methods:

Type 1: OSC_IN and OSC_OUT are connected to ground through 10K resistors respectively. This method can improve EMC performance;

Type 2: Remap OSC_IN and OSC_OUT to PD0 and PD1 respectively, and then configure PD0 and PD1 as push-pull outputs and output '0'. This method can reduce power consumption and save 2 external resistors (compared to the above). 

The difference between active crystal oscillator and passive crystal oscillator

1. Different pins:

1. The passive crystal oscillator is a non-polar component with 2 pins. It requires the help of a clock circuit to generate an oscillation signal and cannot oscillate by itself.

2. The active crystal oscillator has 4 pins and is a complete oscillator. In addition to the quartz crystal, there are also transistors and resistor-capacitor components. It depends on the circuit you apply. If there is a clock circuit, use passive. Otherwise, use passive crystal oscillator. Just use active.

2. The needs for oscillators are different;

1. Passive crystals need to use the oscillator in the DSP chip. Passive crystals have no voltage problems. The signal level is variable, which means it is determined based on the oscillator circuit. The same crystal can be used in a variety of applications. voltage, can be used for a variety of DSPs with different clock signal voltage requirements, and the price is usually lower.

2. The active crystal oscillator does not require the internal oscillator of the DSP. The signal quality is good, relatively stable, and the connection method is relatively simple (mainly to do power supply filtering, usually using a PI filter network composed of capacitors and inductors, and the output end uses a A small-value resistor can filter the signal), and no complicated configuration is required.

 

Guess you like

Origin blog.csdn.net/llq_the7/article/details/108531834