STM32 RTC crystal often can not afford to start the problem, which is already "industry consensus". The The Many people in a variety of electronic forums to help similar to "seeking expert guidance! RTC crystal can not afford to do vibration," the problem, and the answer can be summarized as "the master cannot help you"
More conspiracy theorists made a ridiculous explanation - STM32 RTC crystal can not afford to ST and crystal manufacturers collusion deliberately engage in out, the purpose is to improve a crystal oscillator manufacturers high-end crystal sales.
Recently made a few boards also used the STM32 RTC, before and after the two versions made a total of about 6, fortunately, did not encounter the crystal can not vibrate the phenomenon. And I used a 3 cents a common crystal, did not use the legendary low-load high-precision crystal. Later in another piece of experimental nature of the board for the first time encountered a crystal that does not oscillates which makes me aware of the seriousness of this problem.
From the above phenomenon, I think the biggest effect on the RTC crystal oscillator should be the PCB wiring. But when the problem is usually PCB has been done, and even have done hundreds of pieces, it is too late to turn back. So we are more concerned about the problem seems to be "how to remedy" the. Search online, you will find the world is so beautiful! Everyone's experience and advice are not the same, or even the opposite! This phenomenon tells us that, in addition to PCB wiring, the biggest effect on the crystal vibration does not seem to be electrical parameters, but another factor can not be ignored - workmanship!
Various contradictory experiences also tell us that the cause of the crystal can not be vibrated is varied, but also because of "people" are different. Perhaps we can not find an absolutely effective experience to solve the headache problem of the STM32 RTC crystal in one fell swoop, but we can find some clues from the various experiences and provide some help for finding out the solution that suits your own board And tips.
If the crystal can not start, especially if you have used the legendary Epson 6pF crystal or not, maybe you should try to arrange the following aspects of the combination, find the board for you, more likely to start the way.
The following list of factors that may affect the RTC crystal oscillator
1. Crystal brand and load capacitance We seem to know that you want to use 6pF crystal, but I found that in fact 12.5pF can also be used. We all said that KDS Japan's original good, my 3 cents that made the domestic crystal looks like nothing big problem.
2. Crystal external matching capacitor Some people say that 6pF crystal with 6pF capacitor. But the empirical formula that the capacitor should be the value of the crystal itself is twice the load capacitance, 6pF crystal should be equipped with 10pF matching capacitor, of course, 12.5pF should be equipped with 20pF or 22pF capacitance ~ capacitance does not match may cause crystal Can not stand vibration Even more amazing is that it was pointed out that removing the external matching capacitor will make the crystal vibrate! This seems nothing to make sense, but on my board, there is only this program is feasible!
3. Crystal in parallel with the feedback resistor crystal can be connected in parallel with a high resistance of the resistance, it is said that it is easier to start the vibration. The The The resistance of some resistance that is 1MΩ, it was said to be 5MΩ, it was also said that 10MΩ ,,, of course, some people can not say that this resistor can be connected in parallel, but not vibration
4. XTALout to the crystal series resistance This approach is the official application note pointed out, and gives the resistance of the formula. The need for this resistance is also different opinions, there are two contradictory argument, that must have this resistance, or not vibration. There is a saying that can not have this resistance, or not vibration. The The From the official application notes, the main role of this resistor is to protect the crystal, to prevent crystal vibration. It seems that this resistance does not seem to affect the main factors of crystal vibration, and even may make the crystal more difficult to start.
5. Crystal shell of the ground is not necessary to say it. The The Crystal shell is a metal, do the packaging can be made when the pad of mechanical pad and floating, can also be made into electrical pads, and then connected to the GND. This argument is also controversial, it was said that the shell must be grounded, some people say that after the ground but not vibration.
6. Improve the power quality of the Vbat pin This argument is justified, because the RTC part is powered by Vbat. Some people say that Vbat pin on the power quality requirements are relatively high, if the larger ripple may affect the crystal vibration. Some people say that they need some noise, encourage the crystal to produce positive feedback to smooth the vibration (I said Oh). The The But in any case, to improve the quality of power for everyone is a good thing ~
7. The environment around the crystal It was pointed out that the circuit around the RTC crystal should be carefully cleaned, or even sealed with epoxy resin. This argument has been some people's support, it seems there is a considerable number of factual basis.
8. Reduce the time of heating when the crystal welding Some people think that long-term heating crystal oscillator will have an impact on the crystal itself, but not completely damage the crystal, so that the crystal is not easy to start vibration. The The I have not verified this argument, personally expressed doubts.
9. Welding the amount of solder this kind of feeling even more do not fly, but really someone in the crystal pin on the point of the solder crystal can be more vibration. In principle, the addition of solder does change the parasitic parameters between the crystal and the PCB, but I feel the impact is minimal. The The It may have been wandering in the edge of the threshold, and this approach will play a little role.
10. Use *active crystal
Personally think that this is once and for all can not solve the problem of vibration can not afford the only way! Some people on the STM32 RTC crystal vibration is not easy to start the reason to do an explanation that, for low power consumption considerations, STM32 crystal drive power is relatively low, the so-called "good drum without heavy hammer", some poor crystal need more High drive power, so it is not easy to start vibration. I think that this explanation is justified. The use of active crystal does not exist the problem of driving power, if the problem is indeed due to the driving power caused by the use of active crystal no doubt can completely solve the problem. And now the Internet has not seen that the active crystal can not afford to help. But active crystal is usually more expensive, even more expensive than an external RTC chip. As for the choice of this issue, it is necessary to see you see their own ideas.