cancel
Showing results for 
Search instead for 
Did you mean: 

External crystal on STM32F072.

re.wolff9
Senior
Posted on November 02, 2015 at 17:08

I remember from the 1980s that my colleague responsible for the hardware had some trouble getting an oscillator for our MCU to work. But the last decade designing my own hardware, it seemed as if things had improved. All sorts of complicated mumbojumbo in the datasheets, but just plug a crystal on the board, two load capacitors (but not always populated), and things would work. 

But now with STM32 it seems things are more complicated again. My standard crystal with two capacitors (now properly mounted) does not work. 

I have found AN2867. It tells me to check Gmcrit as for the STM32F072 the Gm is specified. I tried following the calculation for MY crystal, and ended up with.... Exactly the same number as the example in AN2867: 0.23mA/V: The reason is that my CL1 = CL2 = 20pF (I think I mounted 18pF, is that ok?) and I accepted the AN2678 estimate of 7pF of trace capacitance. For my '072 with Gm of 10mA/V that gives a margin of more than 40. That should be enough, right?

I'm have a bunch of crystals where I don't have a proper datasheet of. And one of those is probably mounted. I'll mount this one tomorrow: 

 http://nl.farnell.com/abracon/abls-8-000mhz-b4-t/crystal-8mhz-18pf-hc-49us/dp/2467757

to see if I can get that to work. 

But given that this one is supposed to work (it's the first and cheapest one that fits my board), would it be possible to chose wrong, and find a crystal that does not work? 

Say: which ones of ''search for 8MHz crystals on farnell.com, select HC49, SMD''. 

are unsuitable for use with an STM32F072?
2 REPLIES 2
Posted on November 02, 2015 at 18:43

Are you sure you're starting it? ie HSE ON, HSE BYPASS OFF

This is an 8 MHz, 8 pF, 500 Ohm ESR part used by ST, decoupled with 10pF and no series resistor.

NX3225GD-8.00M

http://www.ndk.com/images/products/catalog/c_NX3225GD-STD-CRA-3_e.pdf

0690X000006035IQAQ.jpg

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
re.wolff9
Senior
Posted on November 03, 2015 at 08:49

Duh! Of course HSE_BYPASS was on. Apparently that's the default in ChiBios (or at least in the board file I started out with). (And I didn't yet know what ''bypass'' was when I first examined the RCC register). 

Thanks for your help!