2
\$\begingroup\$

I use external crystal for HSE of STM32F0. I plan to use 8MHz Cylinder Crystals. Datasheet of this crystal below

crystal datasheet

Datasheet give crystal load capacitance is 20pF

My questions:

1/ Do I need to add 2 external load capacitors? If do not, where is crystal's ground pin like STM32F0's datasheet crystal section below

STM32F0's datasheet crystal section

2/ Can I know crystal's ESR to calculate Rext? Datasheet give maximum ESR value, so how I determine ESR value?

Thanks so much

\$\endgroup\$
  • \$\begingroup\$ That datasheet is for a wide range of crystals. When you buy a crystal you buy a crystal with specific frequency and load capacitance you want and that is in the part number. Do not blindly assume all crystals of this type you can buy have 20pF load capacitance requirement just because they have the same datasheet. Buy a crystal with load capacitance what works best in your design. Usually load capacitance rating of suggested STM32 crystals is not 20pF but less, if you read the application notes and demonstration board schematics. \$\endgroup\$ – Justme Jul 20 at 7:33
  • \$\begingroup\$ This question is redundant if you take the time to search this site. Since ground is in series with C1,C2, it is still in series so 40pF & 40 pF = 20pF in series. For tuning CMOS and stray input capacitance, some users enjoy slightly less error tuning frequency by reducing C2 by this amount of this several pf, depending on IC used and layout if over a ground plane or not. \$\endgroup\$ – Sunnyskyguy EE75 Jul 20 at 8:51
  • \$\begingroup\$ I confused about "Load Capacitance" information provide in datasheet, is it built in capacitor like some another 3p capacitors. Is this parameter need to put into account to calculate external capacitors? I searched & read many topics about this title before make a question, but my electric knowledge is very basic so I confused with that parameter. If datasheet does not provide that info, I know I need 2 external capacitors \$\endgroup\$ – Ngô Hữu Nam Jul 20 at 13:49
  • \$\begingroup\$ sorry I mean 3p crystals not 3p capacitors \$\endgroup\$ – Ngô Hữu Nam Jul 20 at 14:38
2
\$\begingroup\$

All your questions are answered in AN2867 - Oscillator design guide for STM8AF/AL/S and STM32 microcontrollers. The link is terribly long, so if it didn't work correctly then go to www.st.com and search for "AN2867".

To make the read a bit easier, here are the quick answers to your questions:

1/ Do I need to add 2 external load capacitors? If do not, where is crystal's ground pin like STM32F0's datasheet crystal section below

Yes you will need to add those two capacitors externally.

2/ Can I know crystal's ESR to calculate Rext? Datasheet give maximum ESR value, so how I determine ESR value?

This app note tells you how to calculate Rext. And thankfully they use 8MHz as their example. From page 16 of the app note:

An initial estimation of RExt is obtained by considering the voltage divider formed by RExt and CL2. Thus, the value of RExt is equal to the reactance of CL2. Therefore RExt = 1 / (2 π F CL2), and so, with an oscillation frequency of 8 MHz and CL2 = 15 pF, we have RExt = 1326 Ω.

And I would strongly recommend you read sections 7.1 and 7.2 (layout recommendations and examples) and follow them very closely. It can save you a lot of trouble.

\$\endgroup\$
  • \$\begingroup\$ Thanks, I read AN2867 2 - 3 times, that say "it is recommended to recalculate the gain margin", do I need this? If I do, gain margin calculation need ESR, how I determine? Another question, what is the Load capacitance mean in detasheet? Does it require to calculate or I just ignore? \$\endgroup\$ – Ngô Hữu Nam Jul 20 at 6:19
1
\$\begingroup\$

Do you need external capacitance to ground from each crystal pin?

Sure you do; the whole idea behind this type of oscillator is that there is 180 degrees phase change from the inverter output back to the input. This then satisfies the criteria for an oscillator ie a total loop phase change of 360 (or zero) degrees.

If you don’t add capacitors then it won’t oscillate. If the capacitance isn’t enough it won’t oscillate. Follow what is recommended in the data sheet and use capacitors.

Please read my answer here for a more detailed explanation of why you need capacitors.

My answer here also gives other relevant details.

\$\endgroup\$
  • \$\begingroup\$ I read your answer that you provide and also many other topics relate with this title before make a question. I think my question is not good, not close to what I would like to know. I confused about "Load Capacitance" information provide in datasheet, is it built in capacitor like some another 3p capacitors. Is this parameter need to put into account to calculate external capacitors? I searched & read many topics about this title, but my electric knowledge is very basic so I confused with that parameter. If datasheet does not provide that info, I know I need 2 external capacitors \$\endgroup\$ – Ngô Hữu Nam Jul 20 at 13:50
  • \$\begingroup\$ sorry I mean 3p crystals not 3p capacitors \$\endgroup\$ – Ngô Hữu Nam Jul 20 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.