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

 

14 REPLIES 14

Hi,

so take 20pF (or 16...22pF) - and it will work.

standard circuit:

AScha3_0-1739368544034.png

In cpu F103 is everything, just connect the crystal + 2x 22pF .

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

@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.
SofLit
ST Employee

@Michael_CH ,

Let's do a calculation based on what AN2867 says.

The rule is to have gain margin > 5 (a condition that lets the oscillation to start).

Where:

SofLit_0-1739370602336.png

gm is given by product in the table 6 in the application note:

SofLit_1-1739370656521.png

gm crit formula is provided in the 3.4 Oscillator transconductance section:

SofLit_2-1739370714385.png

In your case: 

CL= 20 pF, C0 = 3 pF, ESR = 80Ω 

-> gmcrit = 4 x 80 x ( 2 x pi x 8.10 6)² x (3.10-12 + 20.10-12)²  = 0,42 mA/V

An example of calculation has been provided in the same application note:

SofLit_3-1739370809772.png

So in your case gain margin = 25 / 0,42 = 59 > 5

Normally it should work.

Hope that answers your question.

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.

@Peter BENSCH 

I have to choose 30pF or 33pF.

I will select 33pF then for the 2 C, as it is more near your value.

Thank you very much!

 

About the layout: It sure not will be ideally, as my PCB will be 2 layers only.

I for sure try to put the crystal and the 2 Capacitors as close as possible to the OSC pins.

 

@SofLit  thanks for confirming that my crystal should work.

 

 

As your question has been answered please Accept as solution the comment that answered your question (Not this comment).

Thanks.

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.