cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103: HSE Crystal Capacitors

Michael_CH
Associate

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

 

1 ACCEPTED SOLUTION

Accepted Solutions

@Michael_CH 

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

View solution in original post

14 REPLIES 14
Peter BENSCH
ST Employee

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

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

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. 

 

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.

In order to give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

So just look at the "blue pill" circuit, as an example:

AScha3_0-1739210086993.png

or at circuit of STM nucleo boards:

AScha3_1-1739210203718.png

So choosing 2x 20 pF should be ok; (out of the typical range 12...20 pF)

If you feel a post has answered your question, please click "Accept as Solution".

 

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. :)

 


@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!

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.

 

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:

SofLit_0-1739288571173.png

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:

SofLit_0-1739288996400.png

CL load max = 8pF.

I recommend you to find one of these crystals or find another one similar with the same characteristics

 

To give better visibility on the answered topics, please click on "Accept as Solution" on the reply which solved your issue or answered your question.
PS:
1 - This is NOT an online support (https://ols.st.com) but a collaborative space.
2 - Please be polite in your reply. Otherwise, it will be reported as inappropriate and you will be permanently blacklisted from my help.

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.