A General Method for Evaluating Vibration Capability
As we all know, the starting ability of crystals is an index of the reliability of the whole circuit. If the starting ability of crystals is not good, there will be a phenomenon of individual inactivation in mass production. Even if the crystal is replaced, the problem still exists. What's the matter? Most of them are that we haven't chosen the crystal well, and we haven't evaluated its compatibility with MCU correctly before.
Figure 1, schematic diagram of typical crystal circuit
Inverter: In IC, Rf is also in IC.
Rd: Current limiting resistors are not used by many customers. It can avoid excessive current in oscillating circuit and limit current.
Cg and Cd: External capacitance, an essential oscillating circuit device.
R: Usually called - r, it's not in the circuit. It's to test the ability of the crystal to oscillate. It's artificially added resistance. This resistance can be increased until the circuit does not oscillate. In order to measure the starting margin of the circuit. EPSON, for example, requires that the equivalent resistance of a crystal be greater than or equal to five times that of a circuit starting OK. For example, the equivalent resistance ESR of MC-146 is 65 K, and that-r is greater than or equal to 5*65=325 K_, which shows that the circuit has no problem in starting vibration.
If this is the experimental method, it is necessary to continuously increase the resistance to know whether the circuit's starting capacity is OK. This resistance value is obtained through constant experiments. It's really troublesome, so how do we calculate it?
How to Calculate the Vibration Initiation Ability of Crystals in STM32L082 Series
In Lora communication project, the requirement is low power consumption. The problem of low power consumption is that there may be no vibration. Firstly, we need to know some parameters of MCU and corresponding crystal, and then calculate the answer by fixed formula.
For example, EPSON crystal MC-146 is used. The main data are as follows:
For example, STM32L082 chip. There are four LSE drive configurations. The last one is used in this project. The corresponding GM value of 2.7uA/V can be found in the data manual corresponding to the chip shown below.
In Section 3.4 of AN2867, Gm is a hyperbole. It is explained as follows:
That is to say, the gain margin value is required to be greater than 5, so that the crystal oscillation can start normally. Some of the original requirements - R greater than or equal to 5 times ESR is consistent.
Then how to calculate gain margin? The formula of gain margin is as follows:
Through the corresponding parameters of crystal oscillation, we can draw the following conclusions:
is = 65kΩ, c0 = 0.8pf, cl = 6.0pf, f = 32.768khz.
_ mcrit = 5.096e-07 代入图4公式, g
最终得到: gain _ magin = g / g _ mcrit = 2.7e-06 / 5.09e-07 = 5.3.
Crystal test data
After EPSON official test, Lora communication uses STM32L082 chip, EPSON crystal oscillator is used in the periphery. ESR value of 5.7 times the starting capacity.