2025-02-10 08:22 AM
Hello
Which are the correct Capacitors to use for HSE on STM32F103 with the following Crystal?
Frequency: 8 MHz
Load capacitance CL: 20 pF
Thank you in advance for a quick hint.
Regards
Michael
Solved! Go to Solution.
2025-02-12 06:08 AM
I have just taken the parameters of your crystal and calculated them according to the AN2867: with a gain margin of 58.451 you are considerably above the minimum of 5, so you can continue working with this crystal.
If you assume a pin capacitance of 4pF, your load capacitors should therefore be larger than 20pF and be around 32pF (2x32pF in parallel + 4pF pin capacitance = 20pF).
However, the layout is just as important as the capacitors, as I mentioned in a previous post.
Good luck!
/Peter
2025-02-10 08:28 AM
Welcome @Michael_CH, to the community!
You have provided too little information for a qualified answer. Essentially, however, you will find everything in detail in AN2867.
Hope that helps?
Regards
/Peter
2025-02-10 08:53 AM
I am not an engineer, but just a hobbyist trying to make my first schematic and a PCB.
I was looking the AN, but honestly that was too complex for me.
Therefore i hope some more experienced people can tell me the correct value for the 2 capacitors there.
Which information is missing?
Thank you.
2025-02-10 09:02 AM
Firstly, the data sheet of the crystal used is important, from which you can see the key values: C0, CL and ESR.
Furthermore, the AN2867 mentioned above also contains important notes on layout from section 7 onwards, which you should read and try to understand.
2025-02-10 10:00 AM
So just look at the "blue pill" circuit, as an example:
or at circuit of STM nucleo boards:
So choosing 2x 20 pF should be ok; (out of the typical range 12...20 pF)
2025-02-10 10:03 AM
Crystal datasheet:
https://datasheet.lcsc.com/szlcsc/1903061615_Yangxing-Tech-X50328MSB2GI_C115962.pdf
CL i already provided: 20 pF
C0: 3 pF max.
ESR: 80Ω max.
Hope that help you to help me. :)
2025-02-10 10:03 AM
@Michael_CH wrote:I am not an engineer, but just a hobbyist trying to make my first schematic and a PCB.
But designing an electronic is an engineering exercise!
2025-02-11 07:36 AM
The 2x 20 pF on the nucleo board are for a 8 MHz crystal with 16 pF CL, if i understood that correctly.
Are this also safe values for my crystal?
CL: 20 pF
C0: 3 pF
ESR: 80 Ω
Thank you.
2025-02-11 07:44 AM - edited 2025-02-11 07:51 AM
Hello @Michael_CH ,
The recommended crystals for STM32 are listed in the application note AN2867 pointed out by @Peter BENSCH .
Table 7. Recommended crystal / MEMS resonators for the LSE oscillator in STM32 products:
Its shows the CL of the recommended crystals. I think you cannot exceed CL =12.5 pF.
EDIT: the table was a recommendation for the LSE.
The recommended crystals are provided in tables Table 8 and Table 9:
CL load max = 8pF.
I recommend you to find one of these crystals or find another one similar with the same characteristics
2025-02-12 05:47 AM
Hello @SofLit
Unfortunately i can't really change to another crystal with a lower CL, because they are not "Basic/Preferred Extended Parts" of JLCPCB and therefore would cause high addtional costs.
This will just be a hobby project, therefore it should be as cheap as possible.
If you would say: to use a CL 20 pF Crystal with an STM32F103 is impossible, well then be it.
But if it is just "not optimal, but should work in 95% of the cases if the right Capacitors are used" i would be happy.
@Peter BENSCHmentioned that a qualified answer is possible if i provide all details and the datasheet of the crystal.
I delivered that and really hope one of you experts can help a beginner with the calculation of the best values for the 2 Capacitors.
Thank you very much in advance.